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.

PR-URL: https://github.com/nodejs/node/pull/17276
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Lance Ball <lball@redhat.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: MichaëZasso <targos@protonmail.com>
This commit is contained in:
Daniel Bevenius authored and Myles Borins committed 2017-12-12 03:27:29 -05:00
1 parent e45c9c651a
commit b833a5989c
1 file changed
+2 -2
+2 -2
View File
@@ -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);
@@ -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);