Fix codefactor
This commit is contained in:
parent
aa800818ed
commit
e99a1a1033
|
@ -529,7 +529,7 @@ private: \
|
||||||
} \
|
} \
|
||||||
_super.Call(info.This(), args); \
|
_super.Call(info.This(), args); \
|
||||||
} \
|
} \
|
||||||
}; \
|
} \
|
||||||
inline void super( \
|
inline void super( \
|
||||||
const Napi::CallbackInfo& info, \
|
const Napi::CallbackInfo& info, \
|
||||||
int argc = 0, \
|
int argc = 0, \
|
||||||
|
@ -540,7 +540,7 @@ private: \
|
||||||
Napi::Function _super = ctor.Get("super_").As<Napi::Function>(); \
|
Napi::Function _super = ctor.Get("super_").As<Napi::Function>(); \
|
||||||
_super.Call(info.This(), argc, argv); \
|
_super.Call(info.This(), argc, argv); \
|
||||||
} \
|
} \
|
||||||
}; \
|
} \
|
||||||
inline static Napi::Function wrap(Napi::Env env) { \
|
inline static Napi::Function wrap(Napi::Env env) { \
|
||||||
napi_value __initResult; \
|
napi_value __initResult; \
|
||||||
napi_create_function(env, #NAME, 0, CLASS::_createEs5, nullptr, &__initResult); \
|
napi_create_function(env, #NAME, 0, CLASS::_createEs5, nullptr, &__initResult); \
|
||||||
|
@ -548,7 +548,7 @@ private: \
|
||||||
_ctorEs5 = Napi::Persistent(ctor); \
|
_ctorEs5 = Napi::Persistent(ctor); \
|
||||||
_ctorEs5.SuppressDestruct(); \
|
_ctorEs5.SuppressDestruct(); \
|
||||||
return ctor; \
|
return ctor; \
|
||||||
}; \
|
} \
|
||||||
inline static Napi::Function wrap( \
|
inline static Napi::Function wrap( \
|
||||||
Napi::Env env, \
|
Napi::Env env, \
|
||||||
Napi::Function superCtor \
|
Napi::Function superCtor \
|
||||||
|
@ -556,7 +556,7 @@ private: \
|
||||||
Napi::Function ctor = wrap(env); \
|
Napi::Function ctor = wrap(env); \
|
||||||
inheritEs5(env, ctor, superCtor); \
|
inheritEs5(env, ctor, superCtor); \
|
||||||
return ctor; \
|
return ctor; \
|
||||||
}; \
|
} \
|
||||||
inline static void method( \
|
inline static void method( \
|
||||||
const char *name, \
|
const char *name, \
|
||||||
Es5MethodCallback cb \
|
Es5MethodCallback cb \
|
||||||
|
@ -565,7 +565,7 @@ private: \
|
||||||
proto.DefineProperty( \
|
proto.DefineProperty( \
|
||||||
Napi::PropertyDescriptor::Function(proto.Env(), proto, name, cb) \
|
Napi::PropertyDescriptor::Function(proto.Env(), proto, name, cb) \
|
||||||
); \
|
); \
|
||||||
}; \
|
} \
|
||||||
inline static void accessorR( \
|
inline static void accessorR( \
|
||||||
const char *name, \
|
const char *name, \
|
||||||
Es5GetterCallback getter \
|
Es5GetterCallback getter \
|
||||||
|
@ -574,7 +574,7 @@ private: \
|
||||||
proto.DefineProperty( \
|
proto.DefineProperty( \
|
||||||
Napi::PropertyDescriptor::Accessor(proto.Env(), proto, name, getter) \
|
Napi::PropertyDescriptor::Accessor(proto.Env(), proto, name, getter) \
|
||||||
); \
|
); \
|
||||||
}; \
|
} \
|
||||||
inline static void accessorRw( \
|
inline static void accessorRw( \
|
||||||
const char *name, \
|
const char *name, \
|
||||||
Es5GetterCallback getter, \
|
Es5GetterCallback getter, \
|
||||||
|
@ -590,7 +590,7 @@ private: \
|
||||||
setter \
|
setter \
|
||||||
) \
|
) \
|
||||||
); \
|
); \
|
||||||
}; \
|
} \
|
||||||
public: \
|
public: \
|
||||||
inline static CLASS *unwrap(Napi::Object thatObj) { \
|
inline static CLASS *unwrap(Napi::Object thatObj) { \
|
||||||
CLASS *that; \
|
CLASS *that; \
|
||||||
|
@ -600,7 +600,7 @@ public: \
|
||||||
reinterpret_cast<void**>(&that) \
|
reinterpret_cast<void**>(&that) \
|
||||||
); \
|
); \
|
||||||
return that; \
|
return that; \
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
#define JS_GET_THAT(CLASS) \
|
#define JS_GET_THAT(CLASS) \
|
||||||
|
|
Loading…
Reference in New Issue