take feedback into account

This commit is contained in:
Rudy Huyn 2019-04-03 22:13:51 -07:00
commit 752b892525
4 changed files with 7 additions and 5 deletions

View file

@ -632,7 +632,7 @@ void CCalcEngine::ProcessCommandWorker(WPARAM wParam)
// Set the "(=xx" indicator.
if (nullptr != m_pCalcDisplay)
{
m_pCalcDisplay->SetParenthesisNumber(m_openParenCount >= 0 ? (unsigned int)m_openParenCount : 0);
m_pCalcDisplay->SetParenthesisNumber(m_openParenCount >= 0 ? static_cast<unsigned int>(m_openParenCount) : 0);
}
if (!m_bError)

View file

@ -217,7 +217,9 @@ void StandardCalculatorViewModel::DisplayPasteError()
void StandardCalculatorViewModel::SetParenthesisCount(_In_ unsigned int parenthesisCount)
{
if (m_OpenParenthesisCount == parenthesisCount)
{
return;
}
OpenParenthesisCount = parenthesisCount;
if (IsProgrammer || IsScientific)

View file

@ -99,11 +99,11 @@ void CalculatorProgrammerRadixOperators::IsErrorVisualState::set(bool value)
}
String^ CalculatorProgrammerRadixOperators::ParenthesisCountToString(unsigned int count) {
return count == 0 ? ref new String(L"") : ref new String(to_wstring(count).data());
return (count == 0) ? ref new String() : ref new String(to_wstring(count).data());
}
void CalculatorProgrammerRadixOperators::CalculatorProgrammerRadixOperators::OpenParenthesisButton_GotFocus(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
void CalculatorProgrammerRadixOperators::CalculatorProgrammerRadixOperators::OpenParenthesisButton_GotFocus(Object^ sender, RoutedEventArgs^ e)
{
Model->SetOpenParenthesisCountNarratorAnnouncement();
}

View file

@ -99,11 +99,11 @@ void CalculatorScientificOperators::SetOperatorRowVisibility()
InvRow2->Visibility = invRowVis;
}
void CalculatorScientificOperators::OpenParenthesisButton_GotFocus(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
void CalculatorScientificOperators::OpenParenthesisButton_GotFocus(Object^ sender, RoutedEventArgs^ e)
{
Model->SetOpenParenthesisCountNarratorAnnouncement();
}
String^ CalculatorScientificOperators::ParenthesisCountToString(unsigned int count) {
return count == 0 ? ref new String(L"") : ref new String(to_wstring(count).data());
return (count == 0) ? ref new String() : ref new String(to_wstring(count).data());
}