mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Tree::unTag
- Added a method for removing a tag.
This commit is contained in:
parent
04fb751678
commit
e4671dd518
2 changed files with 15 additions and 0 deletions
|
@ -177,6 +177,20 @@ void Tree::tag (const std::string& tag)
|
||||||
_tags.push_back (tag);
|
_tags.push_back (tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
void Tree::unTag (const std::string& tag)
|
||||||
|
{
|
||||||
|
std::vector <std::string>::iterator i;
|
||||||
|
for (i = _tags.begin (); i != _tags.end (); ++i)
|
||||||
|
{
|
||||||
|
if (*i == tag)
|
||||||
|
{
|
||||||
|
_tags.erase (i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int Tree::count () const
|
int Tree::count () const
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,6 +55,7 @@ public:
|
||||||
|
|
||||||
bool hasTag (const std::string&) const;
|
bool hasTag (const std::string&) const;
|
||||||
void tag (const std::string&);
|
void tag (const std::string&);
|
||||||
|
void unTag (const std::string&);
|
||||||
|
|
||||||
int count () const;
|
int count () const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue