From b29dd761ae42145c3b0a8973ef613e3b488e5880 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Sun, 1 Dec 2019 15:30:36 +0800 Subject: [PATCH 1/2] src: remove redundant cast in node_dir.cc --- src/node_dir.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_dir.cc b/src/node_dir.cc index 37285928fbd731..e868f8bac5e434 100644 --- a/src/node_dir.cc +++ b/src/node_dir.cc @@ -320,7 +320,7 @@ static void OpenDir(const FunctionCallbackInfo& args) { const enum encoding encoding = ParseEncoding(isolate, args[1], UTF8); - FSReqBase* req_wrap_async = static_cast(GetReqWrap(env, args[2])); + FSReqBase* req_wrap_async = GetReqWrap(env, args[2]); if (req_wrap_async != nullptr) { // openDir(path, encoding, req) AsyncCall(env, req_wrap_async, args, "opendir", encoding, AfterOpenDir, uv_fs_opendir, *path); From 5a69e1c14b9cbd9013dfe19e5b110c1b4141be26 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Sun, 1 Dec 2019 15:31:03 +0800 Subject: [PATCH 2/2] src: delete redundant method in node_dir.h --- src/node_dir.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/node_dir.h b/src/node_dir.h index caef7a5d309180..b55245d5b89a2e 100644 --- a/src/node_dir.h +++ b/src/node_dir.h @@ -18,7 +18,6 @@ class DirHandle : public AsyncWrap { ~DirHandle() override; static void New(const v8::FunctionCallbackInfo& args); - static void Open(const v8::FunctionCallbackInfo& args); static void Read(const v8::FunctionCallbackInfo& args); static void Close(const v8::FunctionCallbackInfo& args);