From d1d21b16dcfa1b9020fc90aad7410cfff98872b3 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 17 Feb 2012 20:34:34 +0000 Subject: [PATCH] - replaced auto_ptr with c++11 unique_ptr --- client/CMusicHandler.cpp | 4 ++-- client/CMusicHandler.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/CMusicHandler.cpp b/client/CMusicHandler.cpp index b6acbb74a..d5d48e86a 100644 --- a/client/CMusicHandler.cpp +++ b/client/CMusicHandler.cpp @@ -421,7 +421,7 @@ void CMusicHandler::queueNext(MusicEntry *queued) } else { - current = next; + current.reset(next.release()); current->play(); } } @@ -465,7 +465,7 @@ void CMusicHandler::musicFinishedCallback(void) if (current.get() == NULL && next.get() != NULL) { - current = next; + current.reset(next.release()); current->play(); } } diff --git a/client/CMusicHandler.h b/client/CMusicHandler.h index 6958352af..f613edb30 100644 --- a/client/CMusicHandler.h +++ b/client/CMusicHandler.h @@ -145,8 +145,8 @@ private: SettingsListener listener; void onVolumeChange(const JsonNode &volumeNode); - std::auto_ptr current; - std::auto_ptr next; + std::unique_ptr current; + std::unique_ptr next; void queueNext(MusicEntry *queued); public: