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_file.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_file.h')
-rw-r--r-- | src/node_file.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/node_file.h b/src/node_file.h index f0c8f1dfbf6..6d2ec48bcdc 100644 --- a/src/node_file.h +++ b/src/node_file.h @@ -114,6 +114,9 @@ class FSReqBase : public ReqWrap<uv_fs_t> { return static_cast<FSReqBase*>(ReqWrap::from_req(req)); } + FSReqBase(const FSReqBase&) = delete; + FSReqBase& operator=(const FSReqBase&) = delete; + private: enum encoding encoding_ = UTF8; bool has_data_ = false; @@ -123,8 +126,6 @@ class FSReqBase : public ReqWrap<uv_fs_t> { // Typically, the content of buffer_ is something like a file name, so // something around 64 bytes should be enough. FSReqBuffer buffer_; - - DISALLOW_COPY_AND_ASSIGN(FSReqBase); }; class FSReqCallback : public FSReqBase { @@ -144,8 +145,8 @@ class FSReqCallback : public FSReqBase { SET_MEMORY_INFO_NAME(FSReqCallback) SET_SELF_SIZE(FSReqCallback) - private: - DISALLOW_COPY_AND_ASSIGN(FSReqCallback); + FSReqCallback(const FSReqCallback&) = delete; + FSReqCallback& operator=(const FSReqCallback&) = delete; }; // Wordaround a GCC4.9 bug that C++14 N3652 was not implemented |