Task: Use one-step attribute erase

This commit is contained in:
Paul Beckingham 2015-11-01 19:03:04 -05:00
parent 136f849aa8
commit 2aa3163451

View file

@ -320,13 +320,9 @@ void Task::set (const std::string& name, int value)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void Task::remove (const std::string& name) void Task::remove (const std::string& name)
{ {
auto it = this->find (name); if (this->erase (name))
if (it != this->end ())
{
this->erase (it);
recalc_urgency = true; recalc_urgency = true;
} }
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
Task::status Task::getStatus () const Task::status Task::getStatus () const