Task: Use one-step attribute erase
This commit is contained in:
@@ -320,12 +320,8 @@ 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;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user