mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 04:27:20 +02:00
Task: Use one-step attribute erase
This commit is contained in:
parent
136f849aa8
commit
2aa3163451
1 changed files with 1 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue