aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/SimpleDatabasePlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-07 21:32:08 +0200
committerMax Kellermann <max@duempel.org>2012-08-07 21:32:08 +0200
commit1a75abffa531d67f3c76f8cdc0423623d1324a95 (patch)
treed6172bad2b8a3012b4ceb224081eead06db954c1 /src/db/SimpleDatabasePlugin.cxx
parentc6a0f5d3f9d70b890dfdc3ae0474dbcf72fe0499 (diff)
downloadmpd-1a75abffa531d67f3c76f8cdc0423623d1324a95.tar.gz
mpd-1a75abffa531d67f3c76f8cdc0423623d1324a95.tar.xz
mpd-1a75abffa531d67f3c76f8cdc0423623d1324a95.zip
Database{Plugin,Visitor}: pass references
Diffstat (limited to 'src/db/SimpleDatabasePlugin.cxx')
-rw-r--r--src/db/SimpleDatabasePlugin.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/db/SimpleDatabasePlugin.cxx b/src/db/SimpleDatabasePlugin.cxx
index 4247c89b1..0f0bedf54 100644
--- a/src/db/SimpleDatabasePlugin.cxx
+++ b/src/db/SimpleDatabasePlugin.cxx
@@ -237,30 +237,30 @@ SimpleDatabase::LookupDirectory(const char *uri) const
}
bool
-SimpleDatabase::Visit(const struct db_selection *selection,
+SimpleDatabase::Visit(const db_selection &selection,
VisitDirectory visit_directory,
VisitSong visit_song,
VisitPlaylist visit_playlist,
GError **error_r) const
{
- const struct directory *directory = LookupDirectory(selection->uri);
+ const struct directory *directory = LookupDirectory(selection.uri);
if (directory == NULL) {
struct song *song;
if (visit_song &&
- (song = GetSong(selection->uri, NULL)) != NULL)
- return visit_song(song, error_r);
+ (song = GetSong(selection.uri, NULL)) != NULL)
+ return visit_song(*song, error_r);
g_set_error(error_r, db_quark(), DB_NOT_FOUND,
"No such directory");
return false;
}
- if (selection->recursive && visit_directory &&
- !visit_directory(directory, error_r))
+ if (selection.recursive && visit_directory &&
+ !visit_directory(*directory, error_r))
return false;
db_lock();
- bool ret = directory->Walk(selection->recursive,
+ bool ret = directory->Walk(selection.recursive,
visit_directory, visit_song, visit_playlist,
error_r);
db_unlock();