diff options
Diffstat (limited to 'Swiften/Compress')
-rw-r--r-- | Swiften/Compress/ZLibCodecompressor.cpp | 2 | ||||
-rw-r--r-- | Swiften/Compress/ZLibCodecompressor.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Swiften/Compress/ZLibCodecompressor.cpp b/Swiften/Compress/ZLibCodecompressor.cpp index a9929a8..344e6b7 100644 --- a/Swiften/Compress/ZLibCodecompressor.cpp +++ b/Swiften/Compress/ZLibCodecompressor.cpp @@ -22,7 +22,7 @@ namespace Swift { static const size_t CHUNK_SIZE = 1024; // If you change this, also change the unittest -ZLibCodecompressor::ZLibCodecompressor() : p(std::make_shared<Private>()) { +ZLibCodecompressor::ZLibCodecompressor() : p(new Private()) { memset(&p->stream, 0, sizeof(z_stream)); p->stream.zalloc = Z_NULL; p->stream.zfree = Z_NULL; diff --git a/Swiften/Compress/ZLibCodecompressor.h b/Swiften/Compress/ZLibCodecompressor.h index 641b7a3..8bc5d88 100644 --- a/Swiften/Compress/ZLibCodecompressor.h +++ b/Swiften/Compress/ZLibCodecompressor.h @@ -6,6 +6,8 @@ #pragma once +#include <memory> + #include <Swiften/Base/API.h> #include <Swiften/Base/SafeByteArray.h> @@ -20,6 +22,6 @@ namespace Swift { protected: struct Private; - std::shared_ptr<Private> p; + const std::unique_ptr<Private> p; }; } |