mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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:
1 parent
64b7398daf
commit
b0da03bdf1
1 file changed
+2
-2
+2
-2
@@ -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);
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user