Merge branch 'buildw4' of https://github.com/bwaldbaum/calculator into buildw4

This commit is contained in:
Brett Waldbaum 2019-03-08 14:37:16 -08:00
commit cfca2b8c89
3 changed files with 3 additions and 5 deletions

View file

@ -158,7 +158,6 @@ void UnitConverterDataLoader::GetUnits(_In_ unordered_map<ViewMode, vector<Order
{ {
// US + Federated States of Micronesia, Marshall Islands, Palau // US + Federated States of Micronesia, Marshall Islands, Palau
bool useUSCustomaryAndFahrenheit = m_currentRegionCode == L"US" || bool useUSCustomaryAndFahrenheit = m_currentRegionCode == L"US" ||
m_currentRegionCode == L"PW" ||
m_currentRegionCode == L"FM" || m_currentRegionCode == L"FM" ||
m_currentRegionCode == L"MH" || m_currentRegionCode == L"MH" ||
m_currentRegionCode == L"PW"; m_currentRegionCode == L"PW";

View file

@ -487,7 +487,7 @@ void StandardCalculatorViewModel::HandleUpdatedOperandData(Command cmdenum)
m_selectedExpressionLastData = L""; m_selectedExpressionLastData = L"";
if (ch == L'x') if (ch == L'x')
{ {
temp = L'\0'; temp[0] = L'\0';
commandIndex = 0; commandIndex = 0;
} }
else else
@ -504,7 +504,7 @@ void StandardCalculatorViewModel::HandleUpdatedOperandData(Command cmdenum)
{ {
if (commandIndex == 0) if (commandIndex == 0)
{ {
delete temp; delete [] temp;
return; return;
} }
@ -552,7 +552,7 @@ bool StandardCalculatorViewModel::IsOperator(Command cmdenum)
{ {
if ((cmdenum == Command::Command0) || (cmdenum == Command::Command1) || (cmdenum == Command::Command2) || (cmdenum == Command::Command3) || (cmdenum == Command::Command4) || (cmdenum == Command::Command5) if ((cmdenum == Command::Command0) || (cmdenum == Command::Command1) || (cmdenum == Command::Command2) || (cmdenum == Command::Command3) || (cmdenum == Command::Command4) || (cmdenum == Command::Command5)
|| (cmdenum == Command::Command6) || (cmdenum == Command::Command7) || (cmdenum == Command::Command8) || (cmdenum == Command::Command9) || (cmdenum == Command::CommandPNT) || (cmdenum == Command::CommandBACK) || (cmdenum == Command::Command6) || (cmdenum == Command::Command7) || (cmdenum == Command::Command8) || (cmdenum == Command::Command9) || (cmdenum == Command::CommandPNT) || (cmdenum == Command::CommandBACK)
|| (cmdenum == Command::CommandEXP) || (cmdenum == Command::CommandFE) || (cmdenum == Command::ModeBasic) || (cmdenum == Command::ModeBasic) || (cmdenum == Command::ModeProgrammer) || (cmdenum == Command::ModeScientific) || (cmdenum == Command::CommandEXP) || (cmdenum == Command::CommandFE) || (cmdenum == Command::ModeBasic) || (cmdenum == Command::ModeProgrammer) || (cmdenum == Command::ModeScientific)
|| (cmdenum == Command::CommandINV) || (cmdenum == Command::CommandCENTR) || (cmdenum == Command::CommandDEG) || (cmdenum == Command::CommandRAD) || (cmdenum == Command::CommandGRAD) || (cmdenum == Command::CommandINV) || (cmdenum == Command::CommandCENTR) || (cmdenum == Command::CommandDEG) || (cmdenum == Command::CommandRAD) || (cmdenum == Command::CommandGRAD)
|| ((cmdenum >= Command::CommandBINEDITSTART) && (cmdenum <= Command::CommandBINEDITEND))) || ((cmdenum >= Command::CommandBINEDITSTART) && (cmdenum <= Command::CommandBINEDITEND)))
{ {

View file

@ -30,7 +30,6 @@ CalculatorProgrammerBitFlipPanel::CalculatorProgrammerBitFlipPanel() :
{ {
InitializeComponent(); InitializeComponent();
auto booleanToVisibilityConverter = ref new Converters::BooleanToVisibilityConverter; auto booleanToVisibilityConverter = ref new Converters::BooleanToVisibilityConverter;
auto booleanToVisibilityNegationConverter = ref new Converters::BooleanToVisibilityNegationConverter;
SetVisibilityBinding(BitFlipPanel, L"IsBinaryBitFlippingEnabled", booleanToVisibilityConverter); SetVisibilityBinding(BitFlipPanel, L"IsBinaryBitFlippingEnabled", booleanToVisibilityConverter);
AssignFlipButtons(); AssignFlipButtons();