diff options
author | gengjiawen <technicalcute@gmail.com> | 2019-03-13 22:56:39 +0800 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2019-03-17 21:58:22 -0400 |
commit | b215bf9dacde65f7904fe87586547b9a8ac5f950 (patch) | |
tree | bd3f11396300fb8354d1fe8e949d9380ebe8f51c /src/node_zlib.cc | |
parent | ed60e863e74786dfb1f868f2a17c939843b64c25 (diff) | |
download | android-node-v8-b215bf9dacde65f7904fe87586547b9a8ac5f950.tar.gz android-node-v8-b215bf9dacde65f7904fe87586547b9a8ac5f950.tar.bz2 android-node-v8-b215bf9dacde65f7904fe87586547b9a8ac5f950.zip |
src: inline macro DISALLOW_COPY_AND_ASSIGN
PR-URL: https://github.com/nodejs/node/pull/26634
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'src/node_zlib.cc')
-rw-r--r-- | src/node_zlib.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/node_zlib.cc b/src/node_zlib.cc index ea8b0e2a76..e333576aa5 100644 --- a/src/node_zlib.cc +++ b/src/node_zlib.cc @@ -145,6 +145,9 @@ class ZlibContext : public MemoryRetainer { tracker->TrackField("dictionary", dictionary_); } + ZlibContext(const ZlibContext&) = delete; + ZlibContext& operator=(const ZlibContext&) = delete; + private: CompressionError ErrorForMessage(const char* message) const; CompressionError SetDictionary(); @@ -160,8 +163,6 @@ class ZlibContext : public MemoryRetainer { std::vector<unsigned char> dictionary_; z_stream strm_; - - DISALLOW_COPY_AND_ASSIGN(ZlibContext); }; // Brotli has different data types for compression and decompression streams, @@ -175,6 +176,9 @@ class BrotliContext : public MemoryRetainer { void GetAfterWriteOffsets(uint32_t* avail_in, uint32_t* avail_out) const; inline void SetMode(node_zlib_mode mode) { mode_ = mode; } + BrotliContext(const BrotliContext&) = delete; + BrotliContext& operator=(const BrotliContext&) = delete; + protected: node_zlib_mode mode_ = NONE; uint8_t* next_in_ = nullptr; @@ -188,9 +192,6 @@ class BrotliContext : public MemoryRetainer { brotli_alloc_func alloc_ = nullptr; brotli_free_func free_ = nullptr; void* alloc_opaque_ = nullptr; - - private: - DISALLOW_COPY_AND_ASSIGN(BrotliContext); }; class BrotliEncoderContext final : public BrotliContext { |