diff --git a/ReactCommon/react/renderer/.clang-tidy b/ReactCommon/react/renderer/.clang-tidy index 1f9babb38a9..8adc91342a1 100644 --- a/ReactCommon/react/renderer/.clang-tidy +++ b/ReactCommon/react/renderer/.clang-tidy @@ -21,5 +21,6 @@ modernize-unary-static-assert, modernize-use-emplace, modernize-shrink-to-fit, modernize-use-equals-default, +modernize-use-nullptr, ' ... diff --git a/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp b/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp index 0c5ccdf083c..e3949b3bda3 100644 --- a/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +++ b/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp @@ -33,7 +33,7 @@ static int FabricDefaultYogaLog( va_copy(args_copy, args); // Adding 1 to add space for terminating null character. - int size_s = vsnprintf(NULL, 0, format, args); + int size_s = vsnprintf(nullptr, 0, format, args); auto size = static_cast(size_s); std::vector buffer(size); diff --git a/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp b/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp index 24db520f337..8b0241cae62 100644 --- a/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp +++ b/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp @@ -219,7 +219,8 @@ TextMeasurement TextLayoutManager::doMeasure( maximumSize.height, attachmentPositions); - jfloat *attachmentData = env->GetFloatArrayElements(attachmentPositions, 0); + jfloat *attachmentData = + env->GetFloatArrayElements(attachmentPositions, nullptr); auto attachments = TextMeasurement::Attachments{}; if (attachmentsCount > 0) { @@ -283,7 +284,8 @@ TextMeasurement TextLayoutManager::doMeasureMapBuffer( maximumSize.height, attachmentPositions); - jfloat *attachmentData = env->GetFloatArrayElements(attachmentPositions, 0); + jfloat *attachmentData = + env->GetFloatArrayElements(attachmentPositions, nullptr); auto attachments = TextMeasurement::Attachments{}; if (attachmentsCount > 0) {