Skip to content

Commit b833a59

Browse files
danbevMylesBorins
authored andcommitted
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: #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 e45c9c6 commit b833a59

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
@@ -1220,7 +1220,7 @@ napi_status napi_delete_property(napi_env env,
12201220
v8::Maybe<bool> delete_maybe = obj->Delete(context, k);
12211221
CHECK_MAYBE_NOTHING(env, delete_maybe, napi_generic_failure);
12221222

1223-
if (result != NULL)
1223+
if (result != nullptr)
12241224
*result = delete_maybe.FromMaybe(false);
12251225

12261226
return GET_RETURN_STATUS(env);
@@ -1398,7 +1398,7 @@ napi_status napi_delete_element(napi_env env,
13981398
v8::Maybe<bool> delete_maybe = obj->Delete(context, index);
13991399
CHECK_MAYBE_NOTHING(env, delete_maybe, napi_generic_failure);
14001400

1401-
if (result != NULL)
1401+
if (result != nullptr)
14021402
*result = delete_maybe.FromMaybe(false);
14031403

14041404
return GET_RETURN_STATUS(env);

0 commit comments

Comments
 (0)