aboutsummaryrefslogtreecommitdiffstats
path: root/src/Song.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-21 23:53:27 +0200
committerMax Kellermann <max@duempel.org>2013-10-21 23:53:30 +0200
commitf8c23488c942a89df74b231307281cf1919fab61 (patch)
tree20923b8ac9b8507ff1ce5e409d5c465e51fe6e2d /src/Song.cxx
parent1e2cda923970057cfab700422ec27f94e7458c25 (diff)
downloadmpd-f8c23488c942a89df74b231307281cf1919fab61.tar.gz
mpd-f8c23488c942a89df74b231307281cf1919fab61.tar.xz
mpd-f8c23488c942a89df74b231307281cf1919fab61.zip
Song: add method ReplaceTag()
Diffstat (limited to '')
-rw-r--r--src/Song.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Song.cxx b/src/Song.cxx
index 7a11a0611..86a5b4672 100644
--- a/src/Song.cxx
+++ b/src/Song.cxx
@@ -109,6 +109,14 @@ Song::Free()
g_free(this);
}
+void
+Song::ReplaceTag(Tag &&_tag)
+{
+ if (tag == nullptr)
+ tag = new Tag();
+ *tag = std::move(_tag);
+}
+
gcc_pure
static inline bool
directory_equals(const Directory &a, const Directory &b)