aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistQueue.cxx
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 /src/PlaylistQueue.cxx
parent43f613d9be9aa2953dcfc0aacfbdfb56d5d1a708 (diff)
downloadmpd-ba161ec572b98d3bcf9f735ff122133319fe896a.tar.gz
mpd-ba161ec572b98d3bcf9f735ff122133319fe896a.tar.xz
mpd-ba161ec572b98d3bcf9f735ff122133319fe896a.zip
song: convert header to C++
Diffstat (limited to 'src/PlaylistQueue.cxx')
-rw-r--r--src/PlaylistQueue.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/PlaylistQueue.cxx b/src/PlaylistQueue.cxx
index c52f49a91..c7b6c21fb 100644
--- a/src/PlaylistQueue.cxx
+++ b/src/PlaylistQueue.cxx
@@ -24,10 +24,7 @@
#include "PlaylistSong.hxx"
#include "Playlist.hxx"
#include "input_stream.h"
-
-extern "C" {
-#include "song.h"
-}
+#include "Song.hxx"
enum playlist_result
playlist_load_into_queue(const char *uri, struct playlist_provider *source,
@@ -36,7 +33,7 @@ playlist_load_into_queue(const char *uri, struct playlist_provider *source,
bool secure)
{
enum playlist_result result;
- struct song *song;
+ Song *song;
char *base_uri = uri != NULL ? g_path_get_dirname(uri) : NULL;
for (unsigned i = 0;
@@ -44,7 +41,7 @@ playlist_load_into_queue(const char *uri, struct playlist_provider *source,
++i) {
if (i < start_index) {
/* skip songs before the start index */
- song_free(song);
+ song->Free();
continue;
}
@@ -53,7 +50,7 @@ playlist_load_into_queue(const char *uri, struct playlist_provider *source,
continue;
result = dest->AppendSong(*pc, song);
- song_free(song);
+ song->Free();
if (result != PLAYLIST_RESULT_SUCCESS) {
g_free(base_uri);
return result;