From f5ae1ce00b85699291a7cdf9782574e70a8c28f5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 19 Jan 2014 10:51:34 +0100 Subject: LightSong: new class to be used by DatabasePlugin callbacks Detach the Song class completely from the public API, only to be used by SimpleDatabase and the update thread. --- src/DatabaseHelpers.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/DatabaseHelpers.cxx') diff --git a/src/DatabaseHelpers.cxx b/src/DatabaseHelpers.cxx index e7bd006f0..58e7aaa3b 100644 --- a/src/DatabaseHelpers.cxx +++ b/src/DatabaseHelpers.cxx @@ -19,7 +19,7 @@ #include "DatabaseHelpers.hxx" #include "DatabasePlugin.hxx" -#include "Song.hxx" +#include "LightSong.hxx" #include "tag/Tag.hxx" #include @@ -37,9 +37,9 @@ struct StringLess { typedef std::set StringSet; static bool -CollectTags(StringSet &set, TagType tag_type, Song &song) +CollectTags(StringSet &set, TagType tag_type, const LightSong &song) { - const Tag *tag = &song.tag; + const Tag *tag = song.tag; bool found = false; for (unsigned i = 0; i < tag->num_items; ++i) { @@ -102,11 +102,11 @@ StatsVisitTag(DatabaseStats &stats, StringSet &artists, StringSet &albums, static bool StatsVisitSong(DatabaseStats &stats, StringSet &artists, StringSet &albums, - Song &song) + const LightSong &song) { ++stats.song_count; - StatsVisitTag(stats, artists, albums, song.tag); + StatsVisitTag(stats, artists, albums, *song.tag); return true; } -- cgit v1.2.3