From f22d4348dcf09ef70eb04354b0006eee3e4c0b60 Mon Sep 17 00:00:00 2001 From: Richard Howell Date: Wed, 20 Apr 2022 16:29:02 -0700 Subject: [PATCH] add casts for implicit int to float Summary: Apply //fbobjc/Tools/cAST:implicit_conversion to existing warnings Reviewed By: matrush Differential Revision: D35787050 fbshipit-source-id: 45f06227e44203cbedf1d10978e1992399a0d06b --- React/CoreModules/RCTFPSGraph.m | 2 +- React/CoreModules/RCTRedBox.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/React/CoreModules/RCTFPSGraph.m b/React/CoreModules/RCTFPSGraph.m index a1b8705b350..535111b1f6f 100644 --- a/React/CoreModules/RCTFPSGraph.m +++ b/React/CoreModules/RCTFPSGraph.m @@ -101,7 +101,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder) for (NSUInteger i = 0; i < _length - 1; i++) { _frames[i] = _frames[i + 1]; } - _frames[_length - 1] = _FPS / scale; + _frames[_length - 1] = (double)_FPS / scale; CGMutablePathRef path = CGPathCreateMutable(); CGPathMoveToPoint(path, NULL, 0, (CGFloat)_height); diff --git a/React/CoreModules/RCTRedBox.mm b/React/CoreModules/RCTRedBox.mm index 8a479f6015d..8cb294137ca 100644 --- a/React/CoreModules/RCTRedBox.mm +++ b/React/CoreModules/RCTRedBox.mm @@ -155,7 +155,7 @@ accessibilityIdentifier:@"" selector:nil block:customButtonHandlers[i]]; - button.frame = CGRectMake(buttonWidth * (4 + i), bottomButtonHeight, buttonWidth, buttonHeight); + button.frame = CGRectMake(buttonWidth * (double)(4 + i), bottomButtonHeight, buttonWidth, buttonHeight); [rootView addSubview:button]; }