mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-20 21:33:10 -07:00
Remove redundant breaks (#1919)
They do not need to be there since return works here.
This commit is contained in:
parent
9deb19682d
commit
a0781b2185
1 changed files with 0 additions and 8 deletions
|
@ -17,24 +17,16 @@ std::shared_ptr<IExpressionCommand> CommandDeserializer::Deserialize(_In_ Calcul
|
||||||
switch (cmdType)
|
switch (cmdType)
|
||||||
{
|
{
|
||||||
case CalculationManager::CommandType::OperandCommand:
|
case CalculationManager::CommandType::OperandCommand:
|
||||||
|
|
||||||
return std::make_shared<COpndCommand>(DeserializeOperand());
|
return std::make_shared<COpndCommand>(DeserializeOperand());
|
||||||
break;
|
|
||||||
|
|
||||||
case CalculationManager::CommandType::Parentheses:
|
case CalculationManager::CommandType::Parentheses:
|
||||||
|
|
||||||
return std::make_shared<CParentheses>(DeserializeParentheses());
|
return std::make_shared<CParentheses>(DeserializeParentheses());
|
||||||
break;
|
|
||||||
|
|
||||||
case CalculationManager::CommandType::UnaryCommand:
|
case CalculationManager::CommandType::UnaryCommand:
|
||||||
|
|
||||||
return std::make_shared<CUnaryCommand>(DeserializeUnary());
|
return std::make_shared<CUnaryCommand>(DeserializeUnary());
|
||||||
break;
|
|
||||||
|
|
||||||
case CalculationManager::CommandType::BinaryCommand:
|
case CalculationManager::CommandType::BinaryCommand:
|
||||||
|
|
||||||
return std::make_shared<CBinaryCommand>(DeserializeBinary());
|
return std::make_shared<CBinaryCommand>(DeserializeBinary());
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw ref new Platform::Exception(E_INVALIDARG, ref new Platform::String(L"Unknown command type"));
|
throw ref new Platform::Exception(E_INVALIDARG, ref new Platform::String(L"Unknown command type"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue