Skip to content

Commit 0cfc7d3

Browse files
committed
apply code change suggestion from @legendecas
1 parent 21c61e8 commit 0cfc7d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/node_api.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,13 +625,13 @@ static void napi_module_register_cb(v8::Local<v8::Object> exports,
625625
v8::Local<v8::Value> module,
626626
v8::Local<v8::Context> context,
627627
void* priv) {
628+
const napi_module* napi_mod = static_cast<const napi_module*>(priv);
628629
napi_module_register_by_symbol(
629630
exports,
630631
module,
631632
context,
632-
static_cast<const napi_module*>(priv)->nm_register_func,
633-
static_cast<int32_t>(
634-
static_cast<const napi_module*>(priv)->nm_api_version));
633+
napi_mod->nm_register_func,
634+
static_cast<int32_t>(napi_mod->nm_api_version));
635635
}
636636

637637
void napi_module_register_by_symbol(v8::Local<v8::Object> exports,

0 commit comments

Comments
 (0)