summaryrefslogtreecommitdiff
path: root/poppler/Stream.h
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2017-05-12 23:03:28 +0200
committerAlbert Astals Cid <aacid@kde.org>2017-05-12 23:03:28 +0200
commitb1f4e35fa2da8909dee07529ce1dd9445639793b (patch)
tree5a11b81f99df67e612eda6b21a105053d33c315b /poppler/Stream.h
parentd34e5304a9094d505ffce8ec4069d4ddf2ee5950 (diff)
Make Stream incRef/decRef private
Object handles it for us Also remove incRef/decRef from OutStream
Diffstat (limited to 'poppler/Stream.h')
-rw-r--r--poppler/Stream.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/poppler/Stream.h b/poppler/Stream.h
index 12f23dd6..9c53ea39 100644
--- a/poppler/Stream.h
+++ b/poppler/Stream.h
@@ -105,10 +105,6 @@ public:
// Destructor.
virtual ~Stream();
- // Reference counting.
- int incRef();
- int decRef();
-
// Get kind of stream.
virtual StreamKind getKind() = 0;
@@ -230,6 +226,12 @@ public:
Stream *addFilters(Dict *dict, int recursion = 0);
private:
+ friend class Object; // for incRef/decRef
+
+ // Reference counting.
+ int incRef();
+ int decRef();
+
virtual GBool hasGetChars() { return false; }
virtual int getChars(int nChars, Guchar *buffer);
@@ -255,10 +257,6 @@ public:
// Desctructor.
virtual ~OutStream ();
- // Reference counting.
- int incRef() { return ++ref; }
- int decRef() { return --ref; }
-
// Close the stream
virtual void close() = 0;
@@ -269,10 +267,6 @@ public:
virtual void put (char c) = 0;
virtual void printf (const char *format, ...) GCC_PRINTF_FORMAT(2,3) = 0;
-
-private:
- int ref; // reference count
-
};
//------------------------------------------------------------------------