diff options
author | Jasmin Jessich <jasmin@anw.at> | 2017-05-21 19:44:02 +0200 |
---|---|---|
committer | Jasmin Jessich <jasmin@anw.at> | 2017-05-21 19:44:02 +0200 |
commit | 4e566656574787472162d7a09bd4460d1ff1e033 (patch) | |
tree | ced22657a6b52db5da45dcab123424aed4e737f4 /epgsearch | |
parent | 30fef3dda362173844b4edb50294803e02308269 (diff) | |
download | vdr-plugin-live-4e566656574787472162d7a09bd4460d1ff1e033.tar.gz vdr-plugin-live-4e566656574787472162d7a09bd4460d1ff1e033.tar.bz2 |
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!
Diffstat (limited to 'epgsearch')
-rw-r--r-- | epgsearch/services.h | 11 |
1 files changed, 5 insertions, 6 deletions
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 |