From f8c23488c942a89df74b231307281cf1919fab61 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 21 Oct 2013 23:53:27 +0200 Subject: Song: add method ReplaceTag() --- src/Song.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Song.cxx') 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) -- cgit v1.2.3