diff --git a/React/CoreModules/RCTFPSGraph.m b/React/CoreModules/RCTFPSGraph.m index bee27f32946..9a6b168e137 100644 --- a/React/CoreModules/RCTFPSGraph.m +++ b/React/CoreModules/RCTFPSGraph.m @@ -97,18 +97,18 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder) self->_label.text = [NSString stringWithFormat:@"%lu", (unsigned long)self->_FPS]; }); - CGFloat scale = 60.0 / _height; + CGFloat scale = 60.0 / (CGFloat)_height; for (NSUInteger i = 0; i < _length - 1; i++) { _frames[i] = _frames[i + 1]; } _frames[_length - 1] = _FPS / scale; CGMutablePathRef path = CGPathCreateMutable(); - CGPathMoveToPoint(path, NULL, 0, _height); + CGPathMoveToPoint(path, NULL, 0, (CGFloat)_height); for (NSUInteger i = 0; i < _length; i++) { - CGPathAddLineToPoint(path, NULL, i, _height - _frames[i]); + CGPathAddLineToPoint(path, NULL, (CGFloat)i, _height - _frames[i]); } - CGPathAddLineToPoint(path, NULL, _length - 1, _height); + CGPathAddLineToPoint(path, NULL, (CGFloat)_length - 1, (CGFloat)_height); _graph.path = path; CGPathRelease(path); diff --git a/React/CoreModules/RCTRedBox.mm b/React/CoreModules/RCTRedBox.mm index 8a4f6573ed0..b2947842c92 100644 --- a/React/CoreModules/RCTRedBox.mm +++ b/React/CoreModules/RCTRedBox.mm @@ -138,8 +138,8 @@ selector:@selector(showExtraDataViewController) block:nil]; - CGFloat buttonWidth = frame.size.width / (4 + [customButtonTitles count]); - CGFloat bottomButtonHeight = frame.size.height - buttonHeight - [self bottomSafeViewHeight]; + CGFloat buttonWidth = frame.size.width / (CGFloat)(4 + [customButtonTitles count]); + CGFloat bottomButtonHeight = frame.size.height - buttonHeight - (CGFloat)[self bottomSafeViewHeight]; dismissButton.frame = CGRectMake(0, bottomButtonHeight, buttonWidth, buttonHeight); reloadButton.frame = CGRectMake(buttonWidth, bottomButtonHeight, buttonWidth, buttonHeight); copyButton.frame = CGRectMake(buttonWidth * 2, bottomButtonHeight, buttonWidth, buttonHeight); @@ -168,7 +168,7 @@ UIView *bottomSafeView = [UIView new]; bottomSafeView.backgroundColor = [UIColor colorWithRed:0.1 green:0.1 blue:0.1 alpha:1]; bottomSafeView.frame = - CGRectMake(0, frame.size.height - [self bottomSafeViewHeight], frame.size.width, [self bottomSafeViewHeight]); + CGRectMake(0, frame.size.height - (CGFloat)[self bottomSafeViewHeight], frame.size.width, (CGFloat)[self bottomSafeViewHeight]); [rootView addSubview:bottomSafeView]; } diff --git a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm index c1b8ce67aae..82a5291dee7 100644 --- a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +++ b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm @@ -246,7 +246,7 @@ NSInteger snapIndex = velocityAlongAxis > 0.0 ? ceil(fractionalIndex) : velocityAlongAxis < 0.0 ? floor(fractionalIndex) : round(fractionalIndex); - CGFloat newTargetContentOffset = (snapIndex * snapToIntervalF) - alignmentOffset; + CGFloat newTargetContentOffset = ((CGFloat)snapIndex * snapToIntervalF) - alignmentOffset; // Set new targetContentOffset if (isHorizontal) {