diff options
| author | ljfa-ag <ljfa-ag@web.de> | 2015-07-12 18:19:59 +0200 |
|---|---|---|
| committer | ljfa-ag <ljfa-ag@web.de> | 2015-07-12 18:19:59 +0200 |
| commit | 65750c0c2941c7c71640ad1b9bc8ff43b45889a9 (patch) | |
| tree | ee6d1fb39209a22d112b8ad6741de5148368816a /src | |
| parent | 1ce4f17facba4dfe62cf52c83b4d59e51b659c31 (diff) | |
| download | Project-Tick-65750c0c2941c7c71640ad1b9bc8ff43b45889a9.tar.gz Project-Tick-65750c0c2941c7c71640ad1b9bc8ff43b45889a9.zip | |
Change the notion of list equality
Diffstat (limited to 'src')
| -rw-r--r-- | src/tag_list.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tag_list.cpp b/src/tag_list.cpp index 2b66889e56..d0ae233e80 100644 --- a/src/tag_list.cpp +++ b/src/tag_list.cpp @@ -95,5 +95,16 @@ auto tag_list::end() const -> const_iterator { return tags.end(); } auto tag_list::cbegin() const -> const_iterator { return tags.cbegin(); } auto tag_list::cend() const -> const_iterator { return tags.cend(); } +bool operator==(const tag_list& lhs, const tag_list& rhs) +{ + if(lhs.size() == 0 && rhs.size() == 0) + return true; + return lhs.el_type_ == rhs.el_type_ && lhs.tags == rhs.tags; } +bool operator!=(const tag_list& lhs, const tag_list& rhs) +{ + return !(lhs == rhs); +} + +} |
