db/DatabaseSong: DatabaseDetachSong(uri) returns instance, not pointer

This commit is contained in:
Max Kellermann
2017-02-08 09:58:20 +01:00
parent 7225e919fc
commit d184231169
4 changed files with 10 additions and 10 deletions

View File

@@ -107,15 +107,15 @@ MakeTag2c()
static const char *uri1 = "/foo/bar.ogg";
static const char *uri2 = "foo/bar.ogg";
DetachedSong *
DetachedSong
DatabaseDetachSong(gcc_unused const Database &db,
gcc_unused const Storage &_storage,
const char *uri)
{
if (strcmp(uri, uri2) == 0)
return new DetachedSong(uri, MakeTag2a());
return DetachedSong(uri, MakeTag2a());
return nullptr;
throw std::runtime_error("No such song");
}
bool