diff options
author | Max Kellermann <max@duempel.org> | 2012-08-07 21:32:08 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-08-07 21:32:08 +0200 |
commit | 1a75abffa531d67f3c76f8cdc0423623d1324a95 (patch) | |
tree | d6172bad2b8a3012b4ceb224081eead06db954c1 /src/Stats.cxx | |
parent | c6a0f5d3f9d70b890dfdc3ae0474dbcf72fe0499 (diff) | |
download | mpd-1a75abffa531d67f3c76f8cdc0423623d1324a95.tar.gz mpd-1a75abffa531d67f3c76f8cdc0423623d1324a95.tar.xz mpd-1a75abffa531d67f3c76f8cdc0423623d1324a95.zip |
Database{Plugin,Visitor}: pass references
Diffstat (limited to 'src/Stats.cxx')
-rw-r--r-- | src/Stats.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Stats.cxx b/src/Stats.cxx index fa76893f1..07e62498b 100644 --- a/src/Stats.cxx +++ b/src/Stats.cxx @@ -83,12 +83,12 @@ visit_tag(StringSet &artists, StringSet &albums, const struct tag *tag) } static bool -collect_stats_song(StringSet &artists, StringSet &albums, struct song *song) +collect_stats_song(StringSet &artists, StringSet &albums, song &song) { ++stats.song_count; - if (song->tag != NULL) - visit_tag(artists, albums, song->tag); + if (song.tag != NULL) + visit_tag(artists, albums, song.tag); return true; } @@ -106,7 +106,7 @@ void stats_update(void) using namespace std::placeholders; const auto f = std::bind(collect_stats_song, std::ref(artists), std::ref(albums), _1); - GetDatabase()->Visit(&selection, f, NULL); + GetDatabase()->Visit(selection, f, NULL); stats.artist_count = artists.size(); stats.album_count = albums.size(); |