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

@@ -57,9 +57,9 @@ struct LightSong {
const char *real_uri;
/**
* Must not be nullptr.
* Metadata.
*/
const Tag *tag;
const Tag &tag;
/**
* The time stamp of the last file modification. A negative
@@ -78,6 +78,9 @@ struct LightSong {
*/
SongTime end_time;
explicit LightSong(const Tag &_tag) noexcept
:tag(_tag) {}
gcc_pure
std::string GetURI() const noexcept {
if (directory == nullptr)