From efc5f73f27de1cc63c7182811293a87de4436359 Mon Sep 17 00:00:00 2001 From: TatianaKapos Date: Tue, 13 Jun 2023 05:30:16 -0700 Subject: [PATCH] Specify float value in ParagraphLayoutManager (#37660) Summary: React-Native-Windows had to override this file because we treat certain warning as errors. This fix adds in the "f suffix" to remove the unspecified float error. ## Changelog: [GENERAL] [FIXED] - Specify float value in ParagraphLayoutManager Pull Request resolved: https://github.com/facebook/react-native/pull/37660 Test Plan: Tested with RNW tests Reviewed By: NickGerleman Differential Revision: D46560099 Pulled By: javache fbshipit-source-id: de593cbe60677533f5194ab8fd7e650607b5829e --- .../react/renderer/components/text/ParagraphLayoutManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphLayoutManager.cpp b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphLayoutManager.cpp index c4a5e886c70d66..41720767d228f4 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphLayoutManager.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphLayoutManager.cpp @@ -58,7 +58,7 @@ bool ParagraphLayoutManager::shoudMeasureString( bool hasMaximumSizeChanged = layoutConstraints.maximumSize.width != lastAvailableWidth_; - Float threshold = 0.01; + Float threshold = 0.01f; bool doesMaximumSizeMatchLastMeasurement = std::abs( layoutConstraints.maximumSize.width -