diff options
author | Max Kellermann <max@duempel.org> | 2014-01-18 19:08:39 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-19 02:58:55 +0100 |
commit | d2cf74027c2c252181ab16c1348281c252665353 (patch) | |
tree | 50dc8efe859419ad9f266bc277049bae34790c78 /src/DetachedSong.cxx | |
parent | bc966577ffb2354f44ebb85ceb83b188bb6907b6 (diff) | |
download | mpd-d2cf74027c2c252181ab16c1348281c252665353.tar.gz mpd-d2cf74027c2c252181ab16c1348281c252665353.tar.xz mpd-d2cf74027c2c252181ab16c1348281c252665353.zip |
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%.
Diffstat (limited to '')
-rw-r--r-- | src/DetachedSong.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/DetachedSong.cxx b/src/DetachedSong.cxx index 4b1d51a41..e8b75f618 100644 --- a/src/DetachedSong.cxx +++ b/src/DetachedSong.cxx @@ -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) {} |