mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
C++11: Cleaned up commands code with range-based for
This commit is contained in:
parent
bd3d58484a
commit
5a57dfd70d
42 changed files with 911 additions and 1065 deletions
|
@ -64,9 +64,8 @@ int CmdCalc::execute (std::string& output)
|
|||
// Compile all the args into one expression.
|
||||
std::string expression;
|
||||
std::vector <std::string> words = context.cli.getWords ();
|
||||
std::vector <std::string>::iterator word;
|
||||
for (word = words.begin (); word != words.end (); ++word)
|
||||
expression += *word + " ";
|
||||
for (auto& word : words)
|
||||
expression += word + " ";
|
||||
|
||||
// Evaluate according to preference.
|
||||
Variant result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue