From fd3c771f453b7f176bdfba5310e494d6fc3d4dd3 Mon Sep 17 00:00:00 2001 From: Rose <83477269+AtariDreams@users.noreply.github.com> Date: Fri, 30 Sep 2022 09:01:58 -0400 Subject: [PATCH] Remove redundant breaks They do not need to be there since return works here. --- .../Common/ExpressionCommandDeserializer.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/CalcViewModel/Common/ExpressionCommandDeserializer.cpp b/src/CalcViewModel/Common/ExpressionCommandDeserializer.cpp index a91d2d35..b25c81cc 100644 --- a/src/CalcViewModel/Common/ExpressionCommandDeserializer.cpp +++ b/src/CalcViewModel/Common/ExpressionCommandDeserializer.cpp @@ -17,24 +17,16 @@ std::shared_ptr CommandDeserializer::Deserialize(_In_ Calcul switch (cmdType) { case CalculationManager::CommandType::OperandCommand: - return std::make_shared(DeserializeOperand()); - break; case CalculationManager::CommandType::Parentheses: - return std::make_shared(DeserializeParentheses()); - break; case CalculationManager::CommandType::UnaryCommand: - return std::make_shared(DeserializeUnary()); - break; case CalculationManager::CommandType::BinaryCommand: - return std::make_shared(DeserializeBinary()); - break; default: throw ref new Platform::Exception(E_INVALIDARG, ref new Platform::String(L"Unknown command type")); @@ -50,7 +42,7 @@ COpndCommand CommandDeserializer::DeserializeOperand() std::shared_ptr> cmdVector = std::make_shared>(); auto cmdVectorSize = m_dataReader->ReadUInt32(); - for (unsigned int j = 0; j < cmdVectorSize; ++j) + for (auto j = cmdVectorSize; j > 0; --j) { int eachOpndcmd = m_dataReader->ReadInt32(); cmdVector->push_back(eachOpndcmd);