Skip to content

Commit

Permalink
Address nits and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
agnat committed May 2, 2016
1 parent f2fe9cd commit a9b3207
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nan.h
Original file line number Diff line number Diff line change
Expand Up @@ -1878,20 +1878,20 @@ SetMethodAux(T recv,
recv->Set(name, GetFunction(tpl).ToLocalChecked());
}

} // end of namespace imp
} // end of namespace imp

template <typename T, template <typename> class HandleType>
NAN_INLINE void SetMethod(
HandleType<T> recv
, const char *name
, FunctionCallback callback) {
HandleScope scope;
v8::Local<v8::FunctionTemplate> tpl = New<v8::FunctionTemplate>(callback);
v8::Local<v8::FunctionTemplate> t = New<v8::FunctionTemplate>(callback);
v8::Local<v8::String> fn_name = New(name).ToLocalChecked();
tpl->SetClassName(fn_name);
t->SetClassName(fn_name);
// Note(@agnat): Pass an empty T* as discriminator. See note on
// SetMethodAux(...) above
imp::SetMethodAux(recv, fn_name, tpl, (T*)0);
imp::SetMethodAux(recv, fn_name, t, static_cast<T*>(0));
}

NAN_INLINE void SetPrototypeMethod(
Expand Down

0 comments on commit a9b3207

Please sign in to comment.