SongSave: wrap DetachedSong* in std::unique_ptr
This commit is contained in:
@@ -160,11 +160,10 @@ directory_load(TextFile &file, Directory &directory)
|
||||
if (directory.FindSong(name) != nullptr)
|
||||
throw FormatRuntimeError("Duplicate song '%s'", name);
|
||||
|
||||
DetachedSong *song = song_load(file, name);
|
||||
auto song = song_load(file, name);
|
||||
|
||||
directory.AddSong(Song::NewFrom(std::move(*song),
|
||||
directory));
|
||||
delete song;
|
||||
} else if ((p = StringAfterPrefix(line, PLAYLIST_META_BEGIN))) {
|
||||
const char *name = p;
|
||||
playlist_metadata_load(file, directory.playlists, name);
|
||||
|
Reference in New Issue
Block a user