diff --git a/src/commands/CmdUrgency.cpp b/src/commands/CmdUrgency.cpp index cb0e44f05..d0afd85aa 100644 --- a/src/commands/CmdUrgency.cpp +++ b/src/commands/CmdUrgency.cpp @@ -50,17 +50,9 @@ CmdUrgency::CmdUrgency () //////////////////////////////////////////////////////////////////////////////// int CmdUrgency::execute (std::string& output) { - // Get all the tasks. - std::vector tasks; - context.tdb.lock (context.config.getBoolean ("locking")); - handleRecurrence (); - context.tdb.loadPending (tasks); - context.tdb.commit (); - context.tdb.unlock (); - // Apply filter. std::vector filtered; - filter (tasks, filtered); + filter (filtered); if (filtered.size () == 0) { @@ -68,7 +60,7 @@ int CmdUrgency::execute (std::string& output) return 1; } - // Find the task(s). + // Display urgency for the selected tasks. std::stringstream out; std::vector ::iterator task; for (task = filtered.begin (); task != filtered.end (); ++task)