From 21e19ef69f1ab6efb5d6647b4428c31cef5cde69 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 26 Feb 2014 20:10:31 +0100 Subject: db/simple/Directory: eliminate method LookupSong() Move to SimpleDatabase::GetSong() to give that method more control. --- src/db/plugins/simple/Directory.cxx | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/db/plugins/simple/Directory.cxx') diff --git a/src/db/plugins/simple/Directory.cxx b/src/db/plugins/simple/Directory.cxx index a81021b47..b4255b0ac 100644 --- a/src/db/plugins/simple/Directory.cxx +++ b/src/db/plugins/simple/Directory.cxx @@ -202,24 +202,6 @@ Directory::FindSong(const char *name_utf8) const return nullptr; } -Song * -Directory::LookupSong(const char *uri) -{ - assert(holding_db_lock()); - assert(uri != nullptr); - - auto r = LookupDirectory(uri); - if (r.uri == nullptr) - /* it's a directory */ - return nullptr; - - if (strchr(r.uri, '/') != nullptr) - /* refers to a URI "below" the actual song */ - return nullptr; - - return r.directory->FindSong(r.uri); -} - static int directory_cmp(gcc_unused void *priv, struct list_head *_a, struct list_head *_b) -- cgit v1.2.3