From 8a92c36916ba7e9cbda6193476f2f28953531761 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 12 May 2014 00:18:22 -0400 Subject: [PATCH] CmdEdit - Converted from A3 to Filter. --- src/commands/CmdEdit.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/commands/CmdEdit.cpp b/src/commands/CmdEdit.cpp index 3a57be4a6..bd14f094a 100644 --- a/src/commands/CmdEdit.cpp +++ b/src/commands/CmdEdit.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -57,21 +58,20 @@ CmdEdit::CmdEdit () // wrench. To be used sparingly. int CmdEdit::execute (std::string& output) { - int rc = 0; - // Filter the tasks. handleRecurrence (); + Filter filter; std::vector filtered; - filter (filtered); + filter.subset (filtered); - // Find number of matching tasks. Skip recurring parent tasks. + // Find number of matching tasks. std::vector ::iterator task; for (task = filtered.begin (); task != filtered.end (); ++task) if (editFile (*task)) context.tdb2.modify (*task); context.tdb2.commit (); - return rc; + return 0; } ////////////////////////////////////////////////////////////////////////////////