- Converted from Parser to CLI.
This commit is contained in:
Paul Beckingham 2014-10-25 23:07:52 -04:00
parent 506d36d74e
commit 6dbacf684c

View file

@ -45,9 +45,9 @@ CmdUndo::CmdUndo ()
int CmdUndo::execute (std::string& output)
{
// Detect attempts to modify the task.
std::vector <Tree*>::iterator i;
for (i = context.parser.tree ()->_branches.begin (); i != context.parser.tree ()->_branches.end (); ++i)
if ((*i)->hasTag ("MODIFICATION"))
std::vector <A>::iterator a;
for (a = context.cli._args.begin (); a != context.cli._args.end (); ++a)
if (a->hasTag ("MODIFICATION"))
throw std::string (STRING_CMD_UNDO_MODS);
context.tdb2.revert ();