mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
C++11: Cleaned up program framework with range-based for
This commit is contained in:
parent
5a57dfd70d
commit
e74c6963a9
28 changed files with 937 additions and 1221 deletions
|
@ -1010,9 +1010,8 @@ bool Variant::operator_match (const Variant& other, const Task& task) const
|
|||
std::map <std::string, std::string> annotations;
|
||||
task.getAnnotations (annotations);
|
||||
|
||||
std::map <std::string, std::string>::iterator a;
|
||||
for (a = annotations.begin (); a != annotations.end (); ++a)
|
||||
if (r.match (a->second))
|
||||
for (auto& a : annotations)
|
||||
if (r.match (a.second))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1028,9 +1027,8 @@ bool Variant::operator_match (const Variant& other, const Task& task) const
|
|||
std::map <std::string, std::string> annotations;
|
||||
task.getAnnotations (annotations);
|
||||
|
||||
std::map <std::string, std::string>::iterator a;
|
||||
for (a = annotations.begin (); a != annotations.end (); ++a)
|
||||
if (find (a->second, pattern, searchCaseSensitive) != std::string::npos)
|
||||
for (auto& a : annotations)
|
||||
if (find (a.second, pattern, searchCaseSensitive) != std::string::npos)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue