mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Enable modernize-use-nullptr clang tidy rule
Summary: changelog: [internal] You can read more about this rule on https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html Reviewed By: rubennorte Differential Revision: D33296118 fbshipit-source-id: ba9de4611c0f0459db9cea56722385e2541b155e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bf9872a7b5
commit
d8d4e95697
@@ -21,5 +21,6 @@ modernize-unary-static-assert,
|
||||
modernize-use-emplace,
|
||||
modernize-shrink-to-fit,
|
||||
modernize-use-equals-default,
|
||||
modernize-use-nullptr,
|
||||
'
|
||||
...
|
||||
|
||||
@@ -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_t>(size_s);
|
||||
std::vector<char> buffer(size);
|
||||
|
||||
|
||||
+4
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user