TagBuilder: implement the assignment operator
This commit is contained in:
parent
ba61a92897
commit
a5574f9189
@ -54,6 +54,23 @@ TagBuilder::TagBuilder(Tag &&other)
|
|||||||
other.items = nullptr;
|
other.items = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TagBuilder &
|
||||||
|
TagBuilder::operator=(const TagBuilder &other)
|
||||||
|
{
|
||||||
|
/* copy all attributes */
|
||||||
|
time = other.time;
|
||||||
|
has_playlist = other.has_playlist;
|
||||||
|
items = other.items;
|
||||||
|
|
||||||
|
/* increment the tag pool refcounters */
|
||||||
|
tag_pool_lock.lock();
|
||||||
|
for (auto i : items)
|
||||||
|
tag_pool_dup_item(i);
|
||||||
|
tag_pool_lock.unlock();
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TagBuilder::Clear()
|
TagBuilder::Clear()
|
||||||
{
|
{
|
||||||
|
@ -63,11 +63,12 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
TagBuilder(const TagBuilder &other) = delete;
|
TagBuilder(const TagBuilder &other) = delete;
|
||||||
TagBuilder &operator=(const TagBuilder &other) = delete;
|
|
||||||
|
|
||||||
TagBuilder(const Tag &other);
|
TagBuilder(const Tag &other);
|
||||||
TagBuilder(Tag &&other);
|
TagBuilder(Tag &&other);
|
||||||
|
|
||||||
|
TagBuilder &operator=(const TagBuilder &other);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the tag contains no items. This ignores the "time"
|
* Returns true if the tag contains no items. This ignores the "time"
|
||||||
* attribute.
|
* attribute.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user