Song: embed the Tag object statically into class Song
Reduces overhead because we need to manage only one memory allocation. According to valgrind/massif, we save 7%.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
DetachedSong::DetachedSong(const Song &other)
|
||||
:uri(other.GetURI().c_str()),
|
||||
tag(other.tag != nullptr ? *other.tag : Tag()),
|
||||
tag(other.tag),
|
||||
mtime(other.mtime),
|
||||
start_ms(other.start_ms), end_ms(other.end_ms) {}
|
||||
|
||||
|
Reference in New Issue
Block a user