aboutsummaryrefslogtreecommitdiffstats
path: root/src/TagSave.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-07-30 20:11:57 +0200
committerMax Kellermann <max@duempel.org>2013-07-30 20:19:53 +0200
commit06f898cc1240a29b293de0e97ad95a4fdc971254 (patch)
tree001a6d3db039cdc03323f3bfddc13b94bde31ce4 /src/TagSave.cxx
parent6a9ab8bc0e2f5d34803513bb2d94d041a607a58c (diff)
downloadmpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.gz
mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.xz
mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.zip
tag: convert to C++
Diffstat (limited to '')
-rw-r--r--src/TagSave.cxx17
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);
}