mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CLI: A2::unTag added
This commit is contained in:
parent
91b943a26c
commit
d799d553fc
2 changed files with 12 additions and 0 deletions
11
src/CLI.cpp
11
src/CLI.cpp
|
@ -49,6 +49,17 @@ void A2::tag (const std::string& tag)
|
||||||
_tags.push_back (tag);
|
_tags.push_back (tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
void A2::unTag (const std::string& tag)
|
||||||
|
{
|
||||||
|
for (auto i = _tags.begin (); i != _tags.end (); ++i)
|
||||||
|
if (*i == tag)
|
||||||
|
{
|
||||||
|
_tags.erase (i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Accessor for attributes.
|
// Accessor for attributes.
|
||||||
void A2::attribute (const std::string& name, const std::string& value)
|
void A2::attribute (const std::string& name, const std::string& value)
|
||||||
|
|
|
@ -39,6 +39,7 @@ public:
|
||||||
A2 (const std::string&, Lexer::Type);
|
A2 (const std::string&, Lexer::Type);
|
||||||
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&);
|
||||||
void attribute (const std::string&, const std::string&);
|
void attribute (const std::string&, const std::string&);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue