aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-07-28 13:25:12 +0200
committerMax Kellermann <max@duempel.org>2013-07-28 13:25:12 +0200
commitba161ec572b98d3bcf9f735ff122133319fe896a (patch)
treea211690e3a8b7fce1fb6db540228122bead1f2bc /test
parent43f613d9be9aa2953dcfc0aacfbdfb56d5d1a708 (diff)
downloadmpd-ba161ec572b98d3bcf9f735ff122133319fe896a.tar.gz
mpd-ba161ec572b98d3bcf9f735ff122133319fe896a.tar.xz
mpd-ba161ec572b98d3bcf9f735ff122133319fe896a.zip
song: convert header to C++
Diffstat (limited to 'test')
-rw-r--r--test/DumpDatabase.cxx4
-rw-r--r--test/FakeSong.cxx6
-rw-r--r--test/dump_playlist.cxx6
-rw-r--r--test/test_queue_priority.cxx12
4 files changed, 14 insertions, 14 deletions
diff --git a/test/DumpDatabase.cxx b/test/DumpDatabase.cxx
index ddafd626c..e917ec831 100644
--- a/test/DumpDatabase.cxx
+++ b/test/DumpDatabase.cxx
@@ -22,7 +22,7 @@
#include "DatabasePlugin.hxx"
#include "DatabaseSelection.hxx"
#include "Directory.hxx"
-#include "song.h"
+#include "Song.hxx"
#include "PlaylistVector.hxx"
#include "conf.h"
#include "tag.h"
@@ -53,7 +53,7 @@ DumpDirectory(const Directory &directory, GError **)
}
static bool
-DumpSong(song &song, GError **)
+DumpSong(Song &song, GError **)
{
cout << "S " << song.parent->path << "/" << song.uri << endl;
return true;
diff --git a/test/FakeSong.cxx b/test/FakeSong.cxx
index 927a07652..ef7879f1b 100644
--- a/test/FakeSong.cxx
+++ b/test/FakeSong.cxx
@@ -18,7 +18,7 @@
*/
#include "config.h"
-#include "song.h"
+#include "Song.hxx"
#include "directory.h"
#include "gcc.h"
@@ -26,8 +26,8 @@
struct directory detached_root;
-struct song *
-song_dup_detached(gcc_unused const struct song *src)
+Song *
+song_dup_detached(gcc_unused const Song *src)
{
abort();
}
diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx
index 74486cd98..8eb1d6078 100644
--- a/test/dump_playlist.cxx
+++ b/test/dump_playlist.cxx
@@ -19,7 +19,7 @@
#include "config.h"
#include "TagSave.hxx"
-#include "song.h"
+#include "Song.hxx"
#include "Directory.hxx"
#include "input_stream.h"
#include "conf.h"
@@ -141,7 +141,7 @@ int main(int argc, char **argv)
struct input_stream *is = NULL;
GError *error = NULL;
struct playlist_provider *playlist;
- struct song *song;
+ Song *song;
if (argc != 3) {
g_printerr("Usage: dump_playlist CONFIG URI\n");
@@ -234,7 +234,7 @@ int main(int argc, char **argv)
if (song->tag != NULL)
tag_save(stdout, song->tag);
- song_free(song);
+ song->Free();
}
/* deinitialize everything */
diff --git a/test/test_queue_priority.cxx b/test/test_queue_priority.cxx
index 8dd1c3f5f..2e544253d 100644
--- a/test/test_queue_priority.cxx
+++ b/test/test_queue_priority.cxx
@@ -1,6 +1,6 @@
#include "config.h"
#include "Queue.hxx"
-#include "song.h"
+#include "Song.hxx"
#include "Directory.hxx"
#include <glib.h>
@@ -10,14 +10,14 @@ Directory detached_root;
Directory::Directory() {}
Directory::~Directory() {}
-struct song *
-song_dup_detached(const struct song *src)
+Song *
+Song::DupDetached() const
{
- return const_cast<song *>(src);
+ return const_cast<Song *>(this);
}
void
-song_free(gcc_unused struct song *song)
+Song::Free()
{
}
@@ -50,7 +50,7 @@ check_descending_priority(const struct queue *queue,
int
main(gcc_unused int argc, gcc_unused char **argv)
{
- static struct song songs[16];
+ static Song songs[16];
struct queue queue(32);