From 9bf12df3445375ff0d7226e3fd75caeabd17eb0a Mon Sep 17 00:00:00 2001 From: Yash Ladha Date: Wed, 25 Nov 2020 13:16:13 +0530 Subject: [PATCH] fs: move method definition from header We are defining the definition of function in the header file itself. It should be defined in the source file instead of the header file. PR-URL: https://github.com/nodejs/node/pull/36256 Reviewed-By: Antoine du Hamel Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott --- src/node_file.cc | 3 +++ src/node_file.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/node_file.cc b/src/node_file.cc index a2fb9e0b4614d4..f1374634307cfe 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -2534,6 +2534,9 @@ void Initialize(Local target, use_promises_symbol).Check(); } +BindingData* FSReqBase::binding_data() { + return binding_data_.get(); +} } // namespace fs } // end namespace node diff --git a/src/node_file.h b/src/node_file.h index 2b157de5eb485d..95a68b5d89a704 100644 --- a/src/node_file.h +++ b/src/node_file.h @@ -109,7 +109,7 @@ class FSReqBase : public ReqWrap { void MemoryInfo(MemoryTracker* tracker) const override; - BindingData* binding_data() { return binding_data_.get(); } + BindingData* binding_data(); private: std::unique_ptr continuation_data_;