CmdUndo: Converted from CLI to CLI2
This commit is contained in:
@@ -45,9 +45,8 @@ CmdUndo::CmdUndo ()
|
|||||||
int CmdUndo::execute (std::string& output)
|
int CmdUndo::execute (std::string& output)
|
||||||
{
|
{
|
||||||
// Detect attempts to modify the task.
|
// Detect attempts to modify the task.
|
||||||
for (auto& a : context.cli._args)
|
if (context.cli2.getWords ().size ())
|
||||||
if (a.hasTag ("MODIFICATION"))
|
throw std::string (STRING_CMD_UNDO_MODS);
|
||||||
throw std::string (STRING_CMD_UNDO_MODS);
|
|
||||||
|
|
||||||
context.tdb2.revert ();
|
context.tdb2.revert ();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user