Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d4284a4

Browse files
danbevMylesBorins
authored andcommittedApr 16, 2018
n-api: use nullptr instead of NULL in node_api.cc
This commit changes two checks which use NULL to use nullptr. I'm not very familiar with N-API but wanted to bring this up in case it was something that was overlooked. Backport-PR-URL: #19447 PR-URL: #17276 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Lance Ball <[email protected]> Reviewed-By: Alexey Orlenko <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: MichaëZasso <[email protected]>
1 parent c685212 commit d4284a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/node_api.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ napi_status napi_delete_property(napi_env env,
12281228
v8::Maybe<bool> delete_maybe = obj->Delete(context, k);
12291229
CHECK_MAYBE_NOTHING(env, delete_maybe, napi_generic_failure);
12301230

1231-
if (result != NULL)
1231+
if (result != nullptr)
12321232
*result = delete_maybe.FromMaybe(false);
12331233

12341234
return GET_RETURN_STATUS(env);
@@ -1406,7 +1406,7 @@ napi_status napi_delete_element(napi_env env,
14061406
v8::Maybe<bool> delete_maybe = obj->Delete(context, index);
14071407
CHECK_MAYBE_NOTHING(env, delete_maybe, napi_generic_failure);
14081408

1409-
if (result != NULL)
1409+
if (result != nullptr)
14101410
*result = delete_maybe.FromMaybe(false);
14111411

14121412
return GET_RETURN_STATUS(env);

0 commit comments

Comments
 (0)