summaryrefslogtreecommitdiff
path: root/src/SongSave.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-18 19:08:39 +0100
committerMax Kellermann <max@duempel.org>2014-01-19 02:58:55 +0100
commitd2cf74027c2c252181ab16c1348281c252665353 (patch)
tree50dc8efe859419ad9f266bc277049bae34790c78 /src/SongSave.cxx
parentbc966577ffb2354f44ebb85ceb83b188bb6907b6 (diff)
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 'src/SongSave.cxx')
-rw-r--r--src/SongSave.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/SongSave.cxx b/src/SongSave.cxx
index f679de763..790047bb6 100644
--- a/src/SongSave.cxx
+++ b/src/SongSave.cxx
@@ -53,8 +53,7 @@ song_save(FILE *fp, const Song &song)
range_save(fp, song.start_ms, song.end_ms);
- if (song.tag != nullptr)
- tag_save(fp, *song.tag);
+ tag_save(fp, song.tag);
fprintf(fp, SONG_MTIME ": %li\n", (long)song.mtime);
fprintf(fp, SONG_END "\n");