Skip to content

Commit b0da03b

Browse files
danbevgibfahn
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 64b7398 commit b0da03b

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
@@ -1217,7 +1217,7 @@ napi_status napi_delete_property(napi_env env,
12171217
v8::Maybe<bool> delete_maybe = obj->Delete(context, k);
12181218
CHECK_MAYBE_NOTHING(env, delete_maybe, napi_generic_failure);
12191219

1220-
if (result != NULL)
1220+
if (result != nullptr)
12211221
*result = delete_maybe.FromMaybe(false);
12221222

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

1398-
if (result != NULL)
1398+
if (result != nullptr)
13991399
*result = delete_maybe.FromMaybe(false);
14001400

14011401
return GET_RETURN_STATUS(env);

0 commit comments

Comments
 (0)