db/simple/Song: remove static method NewFile()

This commit is contained in:
Max Kellermann
2019-09-04 11:24:44 +02:00
parent 6a13847287
commit 497d090814
3 changed files with 2 additions and 12 deletions

View File

@@ -45,7 +45,7 @@ Song::LoadFile(Storage &storage, const char *path_utf8, Directory &parent)
assert(!uri_has_scheme(path_utf8));
assert(strchr(path_utf8, '\n') == nullptr);
auto song = NewFile(path_utf8, parent);
auto song = std::make_unique<Song>(path_utf8, parent);
if (!song->UpdateFile(storage))
return nullptr;
@@ -98,8 +98,7 @@ Song::LoadFromArchive(ArchiveFile &archive, const char *name_utf8,
assert(!uri_has_scheme(name_utf8));
assert(strchr(name_utf8, '\n') == nullptr);
auto song = NewFile(name_utf8, parent);
auto song = std::make_unique<Song>(name_utf8, parent);
if (!song->UpdateFileInArchive(archive))
return nullptr;