mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-01 18:27:20 +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
|
@ -45,9 +45,8 @@ CmdUndo::CmdUndo ()
|
|||
int CmdUndo::execute (std::string& output)
|
||||
{
|
||||
// Detect attempts to modify the task.
|
||||
std::vector <A>::iterator a;
|
||||
for (a = context.cli._args.begin (); a != context.cli._args.end (); ++a)
|
||||
if (a->hasTag ("MODIFICATION"))
|
||||
for (auto& a : context.cli._args)
|
||||
if (a.hasTag ("MODIFICATION"))
|
||||
throw std::string (STRING_CMD_UNDO_MODS);
|
||||
|
||||
context.tdb2.revert ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue