mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Interval: We can return a const reference to tags.
Interval is already marked as a constant object here and we can eliminate creating unnecessary copies when filtering large databases. Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
This commit is contained in:
parent
c1f3d8be72
commit
b62b7b3435
2 changed files with 2 additions and 2 deletions
|
@ -69,7 +69,7 @@ bool Interval::hasTag (const std::string& tag) const
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::set <std::string> Interval::tags () const
|
||||
const std::set <std::string>& Interval::tags () const
|
||||
{
|
||||
return _tags;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
|
||||
bool empty () const;
|
||||
bool hasTag (const std::string&) const;
|
||||
std::set <std::string> tags () const;
|
||||
const std::set <std::string>& tags () const;
|
||||
void tag (const std::string&);
|
||||
void untag (const std::string&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue