db/simple/Song: convert NewFrom() to constructor

This commit is contained in:
Max Kellermann
2019-09-04 11:36:33 +02:00
parent 497d090814
commit 949916cba1
4 changed files with 12 additions and 18 deletions

View File

@@ -165,8 +165,8 @@ directory_load(TextFile &file, Directory &directory)
auto detached_song = song_load(file, name,
&audio_format);
auto song = Song::NewFrom(std::move(*detached_song),
directory);
auto song = std::make_unique<Song>(std::move(*detached_song),
directory);
song->audio_format = audio_format;
directory.AddSong(std::move(song));