From b833a5989c13db79e9761bef9bbacfa5f2eab011 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 23 Nov 2017 15:25:14 +0100 Subject: [PATCH] n-api: use nullptr instead of NULL in node_api.cc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Colin Ihrig Reviewed-By: Benjamin Gruenbaum Reviewed-By: Timothy Gu Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Michael Dawson Reviewed-By: Lance Ball Reviewed-By: Alexey Orlenko Reviewed-By: James M Snell Reviewed-By: MichaƫZasso --- src/node_api.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_api.cc b/src/node_api.cc index 59ea7635120fa8..f16ceefd5eb5b9 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -1220,7 +1220,7 @@ napi_status napi_delete_property(napi_env env, v8::Maybe 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 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);