aboutsummaryrefslogtreecommitdiffstats
path: root/src/db
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/db
parent6a9ab8bc0e2f5d34803513bb2d94d041a607a58c (diff)
downloadmpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.gz
mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.tar.xz
mpd-06f898cc1240a29b293de0e97ad95a4fdc971254.zip
tag: convert to C++
Diffstat (limited to 'src/db')
-rw-r--r--src/db/ProxyDatabasePlugin.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/db/ProxyDatabasePlugin.cxx b/src/db/ProxyDatabasePlugin.cxx
index 21224e022..6acdb4170 100644
--- a/src/db/ProxyDatabasePlugin.cxx
+++ b/src/db/ProxyDatabasePlugin.cxx
@@ -26,7 +26,7 @@
#include "Song.hxx"
#include "gcc.h"
#include "conf.h"
-#include "tag.h"
+#include "Tag.hxx"
extern "C" {
#include "db_error.h"
@@ -256,7 +256,7 @@ Visit(struct mpd_connection *connection,
}
static void
-Copy(struct tag *tag, enum tag_type d_tag,
+Copy(Tag &tag, enum tag_type d_tag,
const struct mpd_song *song, enum mpd_tag_type s_tag)
{
@@ -265,7 +265,7 @@ Copy(struct tag *tag, enum tag_type d_tag,
if (value == NULL)
break;
- tag_add_item(tag, d_tag, value);
+ tag.AddItem(d_tag, value);
}
}
@@ -278,13 +278,13 @@ Convert(const struct mpd_song *song)
s->start_ms = mpd_song_get_start(song) * 1000;
s->end_ms = mpd_song_get_end(song) * 1000;
- struct tag *tag = tag_new();
+ Tag *tag = new Tag();
tag->time = mpd_song_get_duration(song);
- tag_begin_add(tag);
+ tag->BeginAdd();
for (const auto *i = &tag_table[0]; i->d != TAG_NUM_OF_ITEM_TYPES; ++i)
- Copy(tag, i->d, song, i->s);
- tag_end_add(tag);
+ Copy(*tag, i->d, song, i->s);
+ tag->EndAdd();
s->tag = tag;