From ba161ec572b98d3bcf9f735ff122133319fe896a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 28 Jul 2013 13:25:12 +0200 Subject: song: convert header to C++ --- src/SongPointer.hxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/SongPointer.hxx') diff --git a/src/SongPointer.hxx b/src/SongPointer.hxx index c80f96f4d..ded3b3e1d 100644 --- a/src/SongPointer.hxx +++ b/src/SongPointer.hxx @@ -20,15 +20,15 @@ #ifndef MPD_SONG_POINTER_HXX #define MPD_SONG_POINTER_HXX -#include "song.h" +#include "Song.hxx" #include class SongPointer { - struct song *song; + Song *song; public: - explicit SongPointer(struct song *_song) + explicit SongPointer(Song *_song) :song(_song) {} SongPointer(const SongPointer &) = delete; @@ -39,7 +39,7 @@ public: ~SongPointer() { if (song != nullptr) - song_free(song); + song->Free(); } SongPointer &operator=(const SongPointer &) = delete; @@ -49,11 +49,11 @@ public: return *this; } - operator const struct song *() const { + operator const Song *() const { return song; } - struct song *Steal() { + Song *Steal() { auto result = song; song = nullptr; return result; -- cgit v1.2.3