aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag/TagBuilder.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-03 12:08:54 +0100
committerMax Kellermann <max@duempel.org>2013-12-03 12:09:21 +0100
commita5574f9189f67e673463cde3d4aa629e638cf298 (patch)
tree96cc5034729fbc05537feba411ce621b5e55b4c8 /src/tag/TagBuilder.cxx
parentba61a928971f248620a71663ab8d5a42dc31cc90 (diff)
downloadmpd-a5574f9189f67e673463cde3d4aa629e638cf298.tar.gz
mpd-a5574f9189f67e673463cde3d4aa629e638cf298.tar.xz
mpd-a5574f9189f67e673463cde3d4aa629e638cf298.zip
TagBuilder: implement the assignment operator
Diffstat (limited to 'src/tag/TagBuilder.cxx')
-rw-r--r--src/tag/TagBuilder.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tag/TagBuilder.cxx b/src/tag/TagBuilder.cxx
index 6ba8c12db..b114e882b 100644
--- a/src/tag/TagBuilder.cxx
+++ b/src/tag/TagBuilder.cxx
@@ -54,6 +54,23 @@ TagBuilder::TagBuilder(Tag &&other)
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
TagBuilder::Clear()
{