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 MylesBorins committed Dec 12, 2017
1 parent e45c9c6 commit b833a59
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 @@ -1220,7 +1220,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 @@ -1398,7 +1398,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 b833a59

Please sign in to comment.