From 1a75abffa531d67f3c76f8cdc0423623d1324a95 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Aug 2012 21:32:08 +0200 Subject: Database{Plugin,Visitor}: pass references --- test/DumpDatabase.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test') 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; -- cgit v1.2.3