diff options
author | Max Kellermann <max@duempel.org> | 2013-07-30 20:11:57 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-07-30 20:19:53 +0200 |
commit | 06f898cc1240a29b293de0e97ad95a4fdc971254 (patch) | |
tree | 001a6d3db039cdc03323f3bfddc13b94bde31ce4 /src/Song.cxx | |
parent | 6a9ab8bc0e2f5d34803513bb2d94d041a607a58c (diff) | |
download | mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.gz mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.xz mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.zip |
tag: convert to C++
Diffstat (limited to 'src/Song.cxx')
-rw-r--r-- | src/Song.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Song.cxx b/src/Song.cxx index 90ddcf518..023d52071 100644 --- a/src/Song.cxx +++ b/src/Song.cxx @@ -20,11 +20,12 @@ #include "config.h" #include "Song.hxx" #include "Directory.hxx" -#include "tag.h" +#include "Tag.hxx" #include <glib.h> #include <assert.h> +#include <string.h> Directory detached_root; @@ -94,7 +95,7 @@ Song::DupDetached() const } else song = song_alloc(uri, nullptr); - song->tag = tag_dup(tag); + song->tag = tag != nullptr ? new Tag(*tag) : nullptr; song->mtime = mtime; song->start_ms = start_ms; song->end_ms = end_ms; @@ -105,8 +106,7 @@ Song::DupDetached() const void Song::Free() { - if (tag != nullptr) - tag_free(tag); + delete tag; g_free(this); } |