Skip to content

Commit

Permalink
Remove duplicated condition checks (microsoft#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
janisozaur authored and Daniel Belcher committed Mar 8, 2019
1 parent 13ba479 commit c325cb1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/CalcViewModel/DataLoaders/UnitConverterDataLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ void UnitConverterDataLoader::GetUnits(_In_ unordered_map<ViewMode, vector<Order
{
// US + Federated States of Micronesia, Marshall Islands, Palau
bool useUSCustomaryAndFahrenheit = m_currentRegionCode == L"US" ||
m_currentRegionCode == L"PW" ||
m_currentRegionCode == L"FM" ||
m_currentRegionCode == L"MH" ||
m_currentRegionCode == L"PW";
Expand Down
2 changes: 1 addition & 1 deletion src/CalcViewModel/StandardCalculatorViewModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,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)
|| (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::CommandBINEDITSTART) && (cmdenum <= Command::CommandBINEDITEND)))
{
Expand Down

0 comments on commit c325cb1

Please sign in to comment.