summaryrefslogtreecommitdiff
path: root/src/SongSave.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-19 18:48:38 +0200
committerMax Kellermann <max@duempel.org>2013-10-19 18:48:38 +0200
commitff626ac76357940b2f0ac5cb243a68ac13df0f8a (patch)
tree493888a28950f75f5e254c0ded9dc9703ee83dc3 /src/SongSave.cxx
parent59f8144c50765189594d5932fc25869f9ea6e265 (diff)
*: use references instead of pointers
Diffstat (limited to 'src/SongSave.cxx')
-rw-r--r--src/SongSave.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/SongSave.cxx b/src/SongSave.cxx
index def4ef341..d5b00e270 100644
--- a/src/SongSave.cxx
+++ b/src/SongSave.cxx
@@ -37,19 +37,19 @@
static constexpr Domain song_save_domain("song_save");
void
-song_save(FILE *fp, const Song *song)
+song_save(FILE *fp, const Song &song)
{
- fprintf(fp, SONG_BEGIN "%s\n", song->uri);
+ fprintf(fp, SONG_BEGIN "%s\n", song.uri);
- if (song->end_ms > 0)
- fprintf(fp, "Range: %u-%u\n", song->start_ms, song->end_ms);
- else if (song->start_ms > 0)
- fprintf(fp, "Range: %u-\n", song->start_ms);
+ if (song.end_ms > 0)
+ fprintf(fp, "Range: %u-%u\n", song.start_ms, song.end_ms);
+ else if (song.start_ms > 0)
+ fprintf(fp, "Range: %u-\n", song.start_ms);
- if (song->tag != nullptr)
- tag_save(fp, *song->tag);
+ if (song.tag != nullptr)
+ tag_save(fp, *song.tag);
- fprintf(fp, SONG_MTIME ": %li\n", (long)song->mtime);
+ fprintf(fp, SONG_MTIME ": %li\n", (long)song.mtime);
fprintf(fp, SONG_END "\n");
}