aboutsummaryrefslogtreecommitdiff
path: root/test
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 /test
parentc6a0f5d3f9d70b890dfdc3ae0474dbcf72fe0499 (diff)
Database{Plugin,Visitor}: pass references
Diffstat (limited to 'test')
-rw-r--r--test/DumpDatabase.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/DumpDatabase.cxx b/test/DumpDatabase.cxx
index 4c79b3b4..2e629172 100644
--- a/test/DumpDatabase.cxx
+++ b/test/DumpDatabase.cxx
@@ -48,24 +48,24 @@ my_log_func(const gchar *log_domain, G_GNUC_UNUSED GLogLevelFlags log_level,
}
static bool
-DumpDirectory(const struct directory *directory, GError **)
+DumpDirectory(const directory &directory, GError **)
{
- cout << "D " << directory->path << endl;
+ cout << "D " << directory.path << endl;
return true;
}
static bool
-DumpSong(struct song *song, GError **)
+DumpSong(song &song, GError **)
{
- cout << "S " << song->parent->path << "/" << song->uri << endl;
+ cout << "S " << song.parent->path << "/" << song.uri << endl;
return true;
}
static bool
-DumpPlaylist(const struct playlist_metadata *playlist,
- const struct directory *directory, GError **)
+DumpPlaylist(const playlist_metadata &playlist,
+ const directory &directory, GError **)
{
- cout << "P " << directory->path << "/" << playlist->name << endl;
+ cout << "P " << directory.path << "/" << playlist.name << endl;
return true;
}
@@ -133,7 +133,7 @@ main(int argc, char **argv)
db_selection selection;
db_selection_init(&selection, "", true);
- if (!db->Visit(&selection, DumpDirectory, DumpSong, DumpPlaylist,
+ if (!db->Visit(selection, DumpDirectory, DumpSong, DumpPlaylist,
&error)) {
db->Close();
delete db;