Skip to content

Commit

Permalink
n-api: use nullptr instead of NULL in node_api.cc
Browse files Browse the repository at this point in the history
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.

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]>
  • Loading branch information
danbev authored and gibfahn committed Dec 20, 2017
1 parent 64b7398 commit b0da03b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ napi_status napi_delete_property(napi_env env,
v8::Maybe<bool> delete_maybe = obj->Delete(context, k);
CHECK_MAYBE_NOTHING(env, delete_maybe, napi_generic_failure);

if (result != NULL)
if (result != nullptr)
*result = delete_maybe.FromMaybe(false);

return GET_RETURN_STATUS(env);
Expand Down Expand Up @@ -1395,7 +1395,7 @@ napi_status napi_delete_element(napi_env env,
v8::Maybe<bool> delete_maybe = obj->Delete(context, index);
CHECK_MAYBE_NOTHING(env, delete_maybe, napi_generic_failure);

if (result != NULL)
if (result != nullptr)
*result = delete_maybe.FromMaybe(false);

return GET_RETURN_STATUS(env);
Expand Down

0 comments on commit b0da03b

Please sign in to comment.