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 /autoptr.h | |
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 'autoptr.h')
-rw-r--r-- | autoptr.h | 16 |
1 files changed, 0 insertions, 16 deletions
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 |