From b03106e695bb4d4b2bd52065620fd62e4f68fb11 Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Fri, 14 Nov 2014 15:47:34 -0800 Subject: [PATCH] src: remove unnecessary template parameter The template class information is received via the type of the first argument. So there is no need to use Wrap(handle). PR-URL: https://github.com/joyent/node/pull/8110 Signed-off-by: Trevor Norris Reviewed-by: Fedor Indutny Reviewed-by: Alexis Campailla Reviewed-by: Julien Gilli --- src/base-object-inl.h | 2 +- src/cares_wrap.cc | 4 ++-- src/handle_wrap.cc | 2 +- src/node_contextify.cc | 2 +- src/node_file.cc | 2 +- src/pipe_wrap.cc | 2 +- src/stream_wrap.h | 4 ++-- src/tcp_wrap.cc | 2 +- src/tls_wrap.cc | 2 +- src/udp_wrap.cc | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/base-object-inl.h b/src/base-object-inl.h index 17540f4822e926..ac9c052813eb61 100644 --- a/src/base-object-inl.h +++ b/src/base-object-inl.h @@ -70,7 +70,7 @@ inline void BaseObject::MakeWeak(Type* ptr) { v8::HandleScope scope(env_->isolate()); v8::Local handle = object(); CHECK_GT(handle->InternalFieldCount(), 0); - Wrap(handle, ptr); + Wrap(handle, ptr); handle_.MarkIndependent(); handle_.SetWeak(ptr, WeakCallback); } diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index f9761f960510fc..e59d2a87f93b26 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -73,7 +73,7 @@ class GetAddrInfoReqWrap : public ReqWrap { GetAddrInfoReqWrap::GetAddrInfoReqWrap(Environment* env, Local req_wrap_obj) : ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_GETADDRINFOREQWRAP) { - Wrap(req_wrap_obj, this); + Wrap(req_wrap_obj, this); } @@ -90,7 +90,7 @@ class GetNameInfoReqWrap : public ReqWrap { GetNameInfoReqWrap::GetNameInfoReqWrap(Environment* env, Local req_wrap_obj) : ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_GETNAMEINFOREQWRAP) { - Wrap(req_wrap_obj, this); + Wrap(req_wrap_obj, this); } diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index 3e348a8b258c1a..f4e34effc66784 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -89,7 +89,7 @@ HandleWrap::HandleWrap(Environment* env, handle__(handle) { handle__->data = this; HandleScope scope(env->isolate()); - Wrap(object, this); + Wrap(object, this); QUEUE_INSERT_TAIL(env->handle_wrap_queue(), &handle_wrap_queue_); } diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 23e5b99a343dee..ead5e3efc3bf42 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -205,7 +205,7 @@ class ContextifyContext { if (wrapper.IsEmpty()) return scope.Escape(Local::New(env->isolate(), Handle())); - Wrap(wrapper, this); + Wrap(wrapper, this); return scope.Escape(wrapper); } diff --git a/src/node_file.cc b/src/node_file.cc index 9f03f011c9d62d..6aa09772bd8a95 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -78,7 +78,7 @@ class FSReqWrap: public ReqWrap { syscall_(syscall), data_(data), dest_len_(0) { - Wrap(object(), this); + Wrap(object(), this); } void ReleaseEarly() { diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index a46060cb8b55e4..512b438218ee46 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -60,7 +60,7 @@ class PipeConnectWrap : public ReqWrap { PipeConnectWrap::PipeConnectWrap(Environment* env, Local req_wrap_obj) : ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_PIPEWRAP) { - Wrap(req_wrap_obj, this); + Wrap(req_wrap_obj, this); } diff --git a/src/stream_wrap.h b/src/stream_wrap.h index 726d7f26b72ec4..93c9f046e0193d 100644 --- a/src/stream_wrap.h +++ b/src/stream_wrap.h @@ -37,7 +37,7 @@ class ShutdownWrap : public ReqWrap { public: ShutdownWrap(Environment* env, v8::Local req_wrap_obj) : ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_SHUTDOWNWRAP) { - Wrap(req_wrap_obj, this); + Wrap(req_wrap_obj, this); } static void NewShutdownWrap(const v8::FunctionCallbackInfo& args) { @@ -52,7 +52,7 @@ class WriteWrap: public ReqWrap { WriteWrap(Environment* env, v8::Local obj, StreamWrap* wrap) : ReqWrap(env, obj, AsyncWrap::PROVIDER_WRITEWRAP), wrap_(wrap) { - Wrap(obj, this); + Wrap(obj, this); } void* operator new(size_t size, char* storage) { return storage; } diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index f17ebcef8a61e8..9c1aeee6490e9c 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -61,7 +61,7 @@ class TCPConnectWrap : public ReqWrap { TCPConnectWrap::TCPConnectWrap(Environment* env, Local req_wrap_obj) : ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_TCPWRAP) { - Wrap(req_wrap_obj, this); + Wrap(req_wrap_obj, this); } diff --git a/src/tls_wrap.cc b/src/tls_wrap.cc index 650fa8007855b0..3d8097042240f2 100644 --- a/src/tls_wrap.cc +++ b/src/tls_wrap.cc @@ -75,7 +75,7 @@ TLSCallbacks::TLSCallbacks(Environment* env, error_(nullptr), cycle_depth_(0), eof_(false) { - node::Wrap(object(), this); + node::Wrap(object(), this); MakeWeak(this); // Initialize queue for clearIn writes diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc index 9fbf39120733ab..42b5f1f03a3404 100644 --- a/src/udp_wrap.cc +++ b/src/udp_wrap.cc @@ -64,7 +64,7 @@ SendWrap::SendWrap(Environment* env, bool have_callback) : ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_UDPWRAP), have_callback_(have_callback) { - Wrap(req_wrap_obj, this); + Wrap(req_wrap_obj, this); }