tag/Tag: added operator==(Tag&)

This commit is contained in:
gd 2025-01-29 08:31:19 +02:00
parent 3e9c2cce71
commit 2a9c3a2e50
2 changed files with 11 additions and 0 deletions

@ -7,6 +7,15 @@
#include <cassert>
bool
Tag::operator==(const Tag &other) const noexcept {
return (this == &other) ? true :
duration == other.duration
&& has_playlist == other.has_playlist
&& num_items == other.num_items
&& std::equal(begin(), end(), other.begin(), other.end());
}
void
Tag::Clear() noexcept
{

@ -65,6 +65,8 @@ struct Tag {
return *this;
}
bool operator==(const Tag &other) const noexcept;
/**
* Similar to the move operator, but move only the #TagItem
* array.