mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Composite: Added ::clear for reuse
This commit is contained in:
parent
b7688bd7ea
commit
5f42516f38
2 changed files with 8 additions and 0 deletions
|
@ -137,3 +137,10 @@ std::string Composite::str (bool blend) const
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// So the same instance can be reused.
|
||||
void Composite::clear ()
|
||||
{
|
||||
_layers.clear ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -38,6 +38,7 @@ public:
|
|||
Composite () = default;
|
||||
void add (const std::string&, std::string::size_type, const Color&);
|
||||
std::string str (bool blend = false) const;
|
||||
void clear ();
|
||||
|
||||
private:
|
||||
std::vector <std::tuple <std::string, std::string::size_type, Color>> _layers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue