diff options
author | Max Kellermann <max@duempel.org> | 2013-07-28 13:25:12 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-07-28 13:25:12 +0200 |
commit | ba161ec572b98d3bcf9f735ff122133319fe896a (patch) | |
tree | a211690e3a8b7fce1fb6db540228122bead1f2bc /src/SongPointer.hxx | |
parent | 43f613d9be9aa2953dcfc0aacfbdfb56d5d1a708 (diff) | |
download | mpd-ba161ec572b98d3bcf9f735ff122133319fe896a.tar.gz mpd-ba161ec572b98d3bcf9f735ff122133319fe896a.tar.xz mpd-ba161ec572b98d3bcf9f735ff122133319fe896a.zip |
song: convert header to C++
Diffstat (limited to '')
-rw-r--r-- | src/SongPointer.hxx | 12 |
1 files changed, 6 insertions, 6 deletions
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 <utility> 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; |