Skip to content

Commit f39b48c

Browse files
trevnorrispiscisaureus
authored andcommitted
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<T>(handle). PR-URL: nodejs/node-v0.x-archive#8110 Signed-off-by: Trevor Norris <[email protected]> Reviewed-by: Fedor Indutny <[email protected]> Reviewed-by: Alexis Campailla <[email protected]> Reviewed-by: Julien Gilli <[email protected]>
1 parent 819690f commit f39b48c

File tree

10 files changed

+12
-12
lines changed

10 files changed

+12
-12
lines changed

src/base-object-inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ inline void BaseObject::MakeWeak(Type* ptr) {
7070
v8::HandleScope scope(env_->isolate());
7171
v8::Local<v8::Object> handle = object();
7272
CHECK_GT(handle->InternalFieldCount(), 0);
73-
Wrap<Type>(handle, ptr);
73+
Wrap(handle, ptr);
7474
handle_.MarkIndependent();
7575
handle_.SetWeak<Type>(ptr, WeakCallback<Type>);
7676
}

src/cares_wrap.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class GetAddrInfoReqWrap : public ReqWrap<uv_getaddrinfo_t> {
7373
GetAddrInfoReqWrap::GetAddrInfoReqWrap(Environment* env,
7474
Local<Object> req_wrap_obj)
7575
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_GETADDRINFOREQWRAP) {
76-
Wrap<GetAddrInfoReqWrap>(req_wrap_obj, this);
76+
Wrap(req_wrap_obj, this);
7777
}
7878

7979

@@ -90,7 +90,7 @@ class GetNameInfoReqWrap : public ReqWrap<uv_getnameinfo_t> {
9090
GetNameInfoReqWrap::GetNameInfoReqWrap(Environment* env,
9191
Local<Object> req_wrap_obj)
9292
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_GETNAMEINFOREQWRAP) {
93-
Wrap<GetNameInfoReqWrap>(req_wrap_obj, this);
93+
Wrap(req_wrap_obj, this);
9494
}
9595

9696

src/handle_wrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ HandleWrap::HandleWrap(Environment* env,
8989
handle__(handle) {
9090
handle__->data = this;
9191
HandleScope scope(env->isolate());
92-
Wrap<HandleWrap>(object, this);
92+
Wrap(object, this);
9393
QUEUE_INSERT_TAIL(env->handle_wrap_queue(), &handle_wrap_queue_);
9494
}
9595

src/node_contextify.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class ContextifyContext {
205205
if (wrapper.IsEmpty())
206206
return scope.Escape(Local<Value>::New(env->isolate(), Handle<Value>()));
207207

208-
Wrap<ContextifyContext>(wrapper, this);
208+
Wrap(wrapper, this);
209209
return scope.Escape(wrapper);
210210
}
211211

src/node_file.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class FSReqWrap: public ReqWrap<uv_fs_t> {
7878
syscall_(syscall),
7979
data_(data),
8080
dest_len_(0) {
81-
Wrap<FSReqWrap>(object(), this);
81+
Wrap(object(), this);
8282
}
8383

8484
void ReleaseEarly() {

src/pipe_wrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class PipeConnectWrap : public ReqWrap<uv_connect_t> {
6060

6161
PipeConnectWrap::PipeConnectWrap(Environment* env, Local<Object> req_wrap_obj)
6262
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_PIPEWRAP) {
63-
Wrap<PipeConnectWrap>(req_wrap_obj, this);
63+
Wrap(req_wrap_obj, this);
6464
}
6565

6666

src/stream_wrap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ShutdownWrap : public ReqWrap<uv_shutdown_t> {
3737
public:
3838
ShutdownWrap(Environment* env, v8::Local<v8::Object> req_wrap_obj)
3939
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_SHUTDOWNWRAP) {
40-
Wrap<ShutdownWrap>(req_wrap_obj, this);
40+
Wrap(req_wrap_obj, this);
4141
}
4242

4343
static void NewShutdownWrap(const v8::FunctionCallbackInfo<v8::Value>& args) {
@@ -52,7 +52,7 @@ class WriteWrap: public ReqWrap<uv_write_t> {
5252
WriteWrap(Environment* env, v8::Local<v8::Object> obj, StreamWrap* wrap)
5353
: ReqWrap(env, obj, AsyncWrap::PROVIDER_WRITEWRAP),
5454
wrap_(wrap) {
55-
Wrap<WriteWrap>(obj, this);
55+
Wrap(obj, this);
5656
}
5757

5858
void* operator new(size_t size, char* storage) { return storage; }

src/tcp_wrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class TCPConnectWrap : public ReqWrap<uv_connect_t> {
6161

6262
TCPConnectWrap::TCPConnectWrap(Environment* env, Local<Object> req_wrap_obj)
6363
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_TCPWRAP) {
64-
Wrap<TCPConnectWrap>(req_wrap_obj, this);
64+
Wrap(req_wrap_obj, this);
6565
}
6666

6767

src/tls_wrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ TLSCallbacks::TLSCallbacks(Environment* env,
7575
error_(nullptr),
7676
cycle_depth_(0),
7777
eof_(false) {
78-
node::Wrap<TLSCallbacks>(object(), this);
78+
node::Wrap(object(), this);
7979
MakeWeak(this);
8080

8181
// Initialize queue for clearIn writes

src/udp_wrap.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ SendWrap::SendWrap(Environment* env,
6464
bool have_callback)
6565
: ReqWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_UDPWRAP),
6666
have_callback_(have_callback) {
67-
Wrap<SendWrap>(req_wrap_obj, this);
67+
Wrap(req_wrap_obj, this);
6868
}
6969

7070

0 commit comments

Comments
 (0)