diff options
author | gengjiawen <technicalcute@gmail.com> | 2019-03-13 17:56:39 +0300 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2019-03-18 04:58:22 +0300 |
commit | b215bf9dacde65f7904fe87586547b9a8ac5f950 (patch) | |
tree | bd3f11396300fb8354d1fe8e949d9380ebe8f51c /src/node_union_bytes.h | |
parent | ed60e863e74786dfb1f868f2a17c939843b64c25 (diff) |
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_union_bytes.h')
-rw-r--r-- | src/node_union_bytes.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/node_union_bytes.h b/src/node_union_bytes.h index 33fada73039..0034f184cc3 100644 --- a/src/node_union_bytes.h +++ b/src/node_union_bytes.h @@ -24,10 +24,14 @@ class NonOwningExternalOneByteResource } size_t length() const override { return length_; } + NonOwningExternalOneByteResource(const NonOwningExternalOneByteResource&) = + delete; + NonOwningExternalOneByteResource& operator=( + const NonOwningExternalOneByteResource&) = delete; + private: const uint8_t* data_; size_t length_; - DISALLOW_COPY_AND_ASSIGN(NonOwningExternalOneByteResource); }; class NonOwningExternalTwoByteResource @@ -40,10 +44,14 @@ class NonOwningExternalTwoByteResource const uint16_t* data() const override { return data_; } size_t length() const override { return length_; } + NonOwningExternalTwoByteResource(const NonOwningExternalTwoByteResource&) = + delete; + NonOwningExternalTwoByteResource& operator=( + const NonOwningExternalTwoByteResource&) = delete; + private: const uint16_t* data_; size_t length_; - DISALLOW_COPY_AND_ASSIGN(NonOwningExternalTwoByteResource); }; // Similar to a v8::String, but it's independent from Isolates |