summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/contrib/fileutl.cc1
-rw-r--r--apt-pkg/contrib/sptr.h74
-rw-r--r--apt-private/private-install.cc1
-rw-r--r--cmdline/apt-cache.cc1
-rw-r--r--cmdline/apt-get.cc1
5 files changed, 0 insertions, 78 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 0c0cb05ea..860739f68 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -25,7 +25,6 @@
#include <apt-pkg/fileutl.h>
#include <apt-pkg/macros.h>
#include <apt-pkg/pkgsystem.h>
-#include <apt-pkg/sptr.h>
#include <apt-pkg/strutl.h>
#include <cstdio>
diff --git a/apt-pkg/contrib/sptr.h b/apt-pkg/contrib/sptr.h
deleted file mode 100644
index 77806d94d..000000000
--- a/apt-pkg/contrib/sptr.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// -*- mode: cpp; mode: fold -*-
-// Description /*{{{*/
-/* ######################################################################
-
- Trivial non-ref counted 'smart pointer'
-
- This is really only good to eliminate
- {
- delete Foo;
- return;
- }
-
- Blocks from functions.
-
- I think G++ has become good enough that doing this won't have much
- code size implications.
-
- ##################################################################### */
- /*}}}*/
-#ifndef SMART_POINTER_H
-#define SMART_POINTER_H
-#include <apt-pkg/macros.h>
-
-template <class T>
-class APT_DEPRECATED_MSG("use std::unique_ptr instead") SPtr
-{
- public:
- T *Ptr;
-
- inline T *operator ->() {return Ptr;};
- inline T &operator *() {return *Ptr;};
- inline operator T *() {return Ptr;};
- inline operator void *() {return Ptr;};
- inline T *UnGuard() {T *Tmp = Ptr; Ptr = 0; return Tmp;};
- inline void operator =(T *N) {Ptr = N;};
- inline bool operator ==(T *lhs) const {return Ptr == lhs;};
- inline bool operator !=(T *lhs) const {return Ptr != lhs;};
- inline T*Get() {return Ptr;};
-
- inline SPtr(T *Ptr) : Ptr(Ptr) {};
- inline SPtr() : Ptr(0) {};
- inline ~SPtr() {delete Ptr;};
-};
-
-template <class T>
-class APT_DEPRECATED_MSG("use std::unique_ptr instead") SPtrArray
-{
- public:
- T *Ptr;
-
- //inline T &operator *() {return *Ptr;};
- inline operator T *() {return Ptr;};
- inline operator void *() {return Ptr;};
- inline T *UnGuard() {T *Tmp = Ptr; Ptr = 0; return Tmp;};
- //inline T &operator [](signed long I) {return Ptr[I];};
- inline void operator =(T *N) {Ptr = N;};
- inline bool operator ==(T *lhs) const {return Ptr == lhs;};
- inline bool operator !=(T *lhs) const {return Ptr != lhs;};
- inline T *Get() {return Ptr;};
-
- 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
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index 40543d995..a5a88c99d 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -18,7 +18,6 @@
#include <apt-pkg/pkgrecords.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/prettyprinters.h>
-#include <apt-pkg/sptr.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/upgrade.h>
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 3c0e477b1..ce7400fc7 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -33,7 +33,6 @@
#include <apt-pkg/policy.h>
#include <apt-pkg/progress.h>
#include <apt-pkg/sourcelist.h>
-#include <apt-pkg/sptr.h>
#include <apt-pkg/srcrecords.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/tagfile.h>
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index da18d2d19..fe6e22d81 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -49,7 +49,6 @@
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/progress.h>
#include <apt-pkg/sourcelist.h>
-#include <apt-pkg/sptr.h>
#include <apt-pkg/srcrecords.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/upgrade.h>