From 4820bde41ec7f53426a3548327d8b75a663acfbd Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 27 Jun 2015 23:08:56 -0400 Subject: [PATCH] CmdCalc: Eliminated temporary storage --- src/commands/CmdCalc.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/commands/CmdCalc.cpp b/src/commands/CmdCalc.cpp index f114ebf81..dd3680ceb 100644 --- a/src/commands/CmdCalc.cpp +++ b/src/commands/CmdCalc.cpp @@ -63,8 +63,7 @@ int CmdCalc::execute (std::string& output) // Compile all the args into one expression. std::string expression; - std::vector words = context.cli2.getWords (); - for (auto& word : words) + for (auto& word : context.cli2.getWords ()) expression += word + " "; // Evaluate according to preference.