From 6dbacf684c2c366884d3f147e47f416b3a04b97c Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 25 Oct 2014 23:07:52 -0400 Subject: [PATCH] CmdUndo - Converted from Parser to CLI. --- src/commands/CmdUndo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/CmdUndo.cpp b/src/commands/CmdUndo.cpp index 0097dda74..6dc451dce 100644 --- a/src/commands/CmdUndo.cpp +++ b/src/commands/CmdUndo.cpp @@ -45,9 +45,9 @@ CmdUndo::CmdUndo () int CmdUndo::execute (std::string& output) { // Detect attempts to modify the task. - std::vector ::iterator i; - for (i = context.parser.tree ()->_branches.begin (); i != context.parser.tree ()->_branches.end (); ++i) - if ((*i)->hasTag ("MODIFICATION")) + std::vector ::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 ();