From 2aa31634513cb85757663ae9855deb2a8d97dcbc Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 1 Nov 2015 19:03:04 -0500 Subject: [PATCH] Task: Use one-step attribute erase --- src/Task.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Task.cpp b/src/Task.cpp index c0b19be75..78cfd9238 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -320,12 +320,8 @@ void Task::set (const std::string& name, int value) //////////////////////////////////////////////////////////////////////////////// void Task::remove (const std::string& name) { - auto it = this->find (name); - if (it != this->end ()) - { - this->erase (it); + if (this->erase (name)) recalc_urgency = true; - } } ////////////////////////////////////////////////////////////////////////////////