From 4e566656574787472162d7a09bd4460d1ff1e033 Mon Sep 17 00:00:00 2001 From: Jasmin Jessich Date: Sun, 21 May 2017 19:44:02 +0200 Subject: Use "std::unique_ptr" instead of "std::auto_ptr" - Compile plugin with C++11 compiler, to allow usage of "std::unique_ptr". - Added "-Wfatal-errors -Wall" to stop on the first error and switch on all warnings. - Removed autoptr.h and used "std::unique_ptr" instead where macro AUTO_PTR has been used. Checked also, if the pointers are used correctly, because "std::unique_ptr" is not 100% compatible to "std::auto_ptr", when the pointer is "moved". "std::unique_ptr" needs an explicit call to "std::move" in this case (AFAIU). Keep "std::auto_ptr" in the epgsearch interface! --- timers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'timers.cpp') diff --git a/timers.cpp b/timers.cpp index bf954fc..8f3eea8 100644 --- a/timers.cpp +++ b/timers.cpp @@ -3,10 +3,10 @@ #include "exception.h" #include "tools.h" -#include "autoptr.h" // STL headers need to be before VDR tools.h (included by ) #include +#include #include #include @@ -279,7 +279,7 @@ namespace vdrlive { void TimerManager::DoInsertTimer( TimerPair& timerData ) { - AUTO_PTR< cTimer > newTimer( new cTimer ); + std::unique_ptr< cTimer > newTimer( new cTimer ); if ( !newTimer->Parse( timerData.second.c_str() ) ) { StoreError( timerData, tr("Error in timer settings") ); return; -- cgit v1.2.3