diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | autoptr.h | 16 | ||||
-rw-r--r-- | epgsearch/services.h | 11 | ||||
-rw-r--r-- | grab.h | 5 | ||||
-rw-r--r-- | live.h | 2 | ||||
-rw-r--r-- | pages/edit_timer.ecpp | 3 | ||||
-rw-r--r-- | thread.h | 5 | ||||
-rw-r--r-- | timers.cpp | 4 |
8 files changed, 17 insertions, 31 deletions
@@ -49,6 +49,8 @@ ifneq ($(HAVE_LIBPCRECPP),) LIBS += $(HAVE_LIBPCRECPP) endif +CXXFLAGS += -std=c++11 -Wfatal-errors -Wall # -Werror + ### export all vars for sub-makes, using absolute paths LIBDIR := $(shell cd $(LIBDIR) >/dev/null 2>&1 && pwd) LOCDIR := $(shell cd $(LOCDIR) >/dev/null 2>&1 && pwd) diff --git a/autoptr.h b/autoptr.h deleted file mode 100644 index 4dc0263..0000000 --- a/autoptr.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef VDR_LIVE_AUTOPTR_H -#define VDR_LIVE_AUTOPTR_H - -#define GCC_VERSION (__GNUC__ * 10000 \ - + __GNUC_MINOR__ * 100 \ - + __GNUC_PATCHLEVEL__) - -# include <memory> - -#if GCC_VERSION > 50000 -# define AUTO_PTR std::unique_ptr -#else -# define AUTO_PTR std::auto_ptr -#endif - -#endif // VDR_LIVE_AUTOPTR_H diff --git a/epgsearch/services.h b/epgsearch/services.h index fee274e..9136c51 100644 --- a/epgsearch/services.h +++ b/epgsearch/services.h @@ -24,12 +24,11 @@ The project's page is at http://winni.vdr-developer.org/epgsearch #ifndef EPGSEARCHSERVICES_INC #define EPGSEARCHSERVICES_INC -#include "../autoptr.h" - -// STL headers need to be before VDR tools.h (included by <vdr/channels.h>) +// STL headers need to be before VDR tools.h (included by <vdr/osdbase.h>) #include <string> #include <list> #include <set> +#include <memory> #include <vdr/osdbase.h> @@ -161,7 +160,7 @@ class cServiceHandler struct Epgsearch_services_v1_0 { // in/out - AUTO_PTR<cServiceHandler> handler; + std::auto_ptr<cServiceHandler> handler; }; // Data structures for service "Epgsearch-services-v1.1" @@ -177,7 +176,7 @@ class cServiceHandler_v1_1 : public cServiceHandler struct Epgsearch_services_v1_1 { // in/out - AUTO_PTR<cServiceHandler_v1_1> handler; + std::auto_ptr<cServiceHandler_v1_1> handler; }; // Data structures for service "Epgsearch-services-v1.2" @@ -193,7 +192,7 @@ class cServiceHandler_v1_2 : public cServiceHandler_v1_1 struct Epgsearch_services_v1_2 { // in/out - AUTO_PTR<cServiceHandler_v1_2> handler; + std::auto_ptr<cServiceHandler_v1_2> handler; }; #endif @@ -2,7 +2,8 @@ #define VDR_LIVE_GRAB_H #include "stdext.h" -#include "autoptr.h" + +#include <memory> namespace vdrlive { @@ -28,7 +29,7 @@ private: void PutImage( char* image, int size ); - AUTO_PTR< GrabImageTask > m_task; + std::unique_ptr< GrabImageTask > m_task; GrabImagePtr m_image; int m_size; }; @@ -38,7 +38,7 @@ private: static std::string m_configDirectory; static std::string m_resourceDirectory; - AUTO_PTR< ServerThread > m_thread; + std::unique_ptr< ServerThread > m_thread; }; } // namespace vdrlive diff --git a/pages/edit_timer.ecpp b/pages/edit_timer.ecpp index d080ee5..9a7dfd3 100644 --- a/pages/edit_timer.ecpp +++ b/pages/edit_timer.ecpp @@ -8,7 +8,6 @@ #include <livefeatures.h> #include <epgsearch.h> #include <users.h> -#include <autoptr.h> #include <vdr/timers.h> @@ -103,7 +102,7 @@ cTimer* timer; if (message.empty()) edit_timerreferer = request.getHeader("Referer:", "timers.html"); - AUTO_PTR< cTimer > eventTimer; + std::unique_ptr< cTimer > eventTimer; if ( timer == 0 && !epgid.empty()) { EpgEvents::DecodeDomId(epgid, channelid, eventid); if ( channelid.Valid() && eventid != 0 ) { @@ -1,9 +1,10 @@ #ifndef VDR_LIVE_THREAD_H #define VDR_LIVE_THREAD_H -#include "autoptr.h" #include <vdr/thread.h> +#include <memory> + namespace tnt { class Tntnet; } namespace vdrlive { @@ -19,7 +20,7 @@ protected: virtual void Action(); private: - AUTO_PTR< tnt::Tntnet > m_server; + std::unique_ptr< tnt::Tntnet > m_server; }; } // namespace vdrlive @@ -3,10 +3,10 @@ #include "exception.h" #include "tools.h" -#include "autoptr.h" // STL headers need to be before VDR tools.h (included by <vdr/plugin.h>) #include <sstream> +#include <memory> #include <vdr/plugin.h> #include <vdr/menu.h> @@ -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; |