db/LightSong: make Tag a reference

This enforces the "not nullptr" rule.
This commit is contained in:
Max Kellermann
2018-07-06 16:43:11 +02:00
parent ebc006ab52
commit b9ff6383a4
13 changed files with 23 additions and 26 deletions

View File

@@ -97,9 +97,7 @@ static void
GroupCountVisitor(TagCountMap &map, TagType group,
const LightSong &song) noexcept
{
assert(song.tag != nullptr);
const Tag &tag = *song.tag;
const Tag &tag = song.tag;
if (!CollectGroupCounts(map, group, tag) && group == TAG_ALBUM_ARTIST)
/* fall back to "Artist" if no "AlbumArtist" was found */
CollectGroupCounts(map, TAG_ARTIST, tag);