mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-08 15:20: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
|
@ -55,12 +55,11 @@ int CmdGet::execute (std::string& output)
|
|||
|
||||
bool found = false;
|
||||
std::vector <std::string> results;
|
||||
std::vector <std::string>::iterator word;
|
||||
for (word = words.begin (); word != words.end (); ++word)
|
||||
for (auto& word : words)
|
||||
{
|
||||
Task t;
|
||||
Variant result;
|
||||
if (context.dom.get (*word, t, result))
|
||||
if (context.dom.get (word, t, result))
|
||||
{
|
||||
results.push_back ((std::string) result);
|
||||
found = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue