X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/500827ed367c8ac277abbd582d389f6738905a09..769e06cf07625f4a2f5c84340ef6af697d7b0894:/apt-pkg/contrib/sptr.h diff --git a/apt-pkg/contrib/sptr.h b/apt-pkg/contrib/sptr.h index 9df0e44a7..ee4a65d60 100644 --- a/apt-pkg/contrib/sptr.h +++ b/apt-pkg/contrib/sptr.h @@ -20,9 +20,10 @@ /*}}}*/ #ifndef SMART_POINTER_H #define SMART_POINTER_H +#include template -class SPtr +class APT_DEPRECATED_MSG("use std::unique_ptr instead") SPtr { public: T *Ptr; @@ -43,7 +44,7 @@ class SPtr }; template -class SPtrArray +class APT_DEPRECATED_MSG("use std::unique_ptr instead") SPtrArray { public: T *Ptr; @@ -60,7 +61,15 @@ class SPtrArray inline SPtrArray(T *Ptr) : Ptr(Ptr) {}; inline SPtrArray() : Ptr(0) {}; +#if __GNUC__ >= 4 + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations" + // gcc warns about this, but we can do nothing here… +#endif inline ~SPtrArray() {delete [] Ptr;}; +#if __GNUC__ >= 4 + #pragma GCC diagnostic pop +#endif }; #endif