diff options
author | Max Kellermann <max@duempel.org> | 2013-07-30 20:11:57 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-07-30 20:19:53 +0200 |
commit | 06f898cc1240a29b293de0e97ad95a4fdc971254 (patch) | |
tree | 001a6d3db039cdc03323f3bfddc13b94bde31ce4 /src/TagSave.cxx | |
parent | 6a9ab8bc0e2f5d34803513bb2d94d041a607a58c (diff) | |
download | mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.gz mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.xz mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.zip |
tag: convert to C++
Diffstat (limited to 'src/TagSave.cxx')
-rw-r--r-- | src/TagSave.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/TagSave.cxx b/src/TagSave.cxx index 51ae53444..4a9b98a90 100644 --- a/src/TagSave.cxx +++ b/src/TagSave.cxx @@ -19,20 +19,21 @@ #include "config.h" #include "TagSave.hxx" -#include "tag.h" +#include "Tag.hxx" #include "TagInternal.hxx" #include "Song.hxx" -void tag_save(FILE *file, const struct tag *tag) +void +tag_save(FILE *file, const Tag &tag) { - if (tag->time >= 0) - fprintf(file, SONG_TIME "%i\n", tag->time); + if (tag.time >= 0) + fprintf(file, SONG_TIME "%i\n", tag.time); - if (tag->has_playlist) + if (tag.has_playlist) fprintf(file, "Playlist: yes\n"); - for (unsigned i = 0; i < tag->num_items; i++) + for (unsigned i = 0; i < tag.num_items; i++) fprintf(file, "%s: %s\n", - tag_item_names[tag->items[i]->type], - tag->items[i]->value); + tag_item_names[tag.items[i]->type], + tag.items[i]->value); } |