From 102b9f325684c0a6d773889f452066b7e854f42c Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Tue, 14 Dec 2021 07:28:13 -0800 Subject: [PATCH] Fix type conversion in RCTViewComponentView Summary: changelog: [internal] [CALayer opacity] is of type `float`, not `CGFloat`. Reviewed By: philIip Differential Revision: D33058967 fbshipit-source-id: 98b214e32f6d35e904a7abb0e01c2d01da50a285 --- .../Mounting/ComponentViews/View/RCTViewComponentView.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index 17461222250e2c..76233a1332c33c 100644 --- a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -189,7 +189,7 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const & // `opacity` if (oldViewProps.opacity != newViewProps.opacity && ![_propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN containsObject:@"opacity"]) { - self.layer.opacity = (CGFloat)newViewProps.opacity; + self.layer.opacity = (float)newViewProps.opacity; needsInvalidateLayer = YES; } @@ -227,7 +227,7 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const & // `shadowOpacity` if (oldViewProps.shadowOpacity != newViewProps.shadowOpacity) { - self.layer.shadowOpacity = (CGFloat)newViewProps.shadowOpacity; + self.layer.shadowOpacity = (float)newViewProps.shadowOpacity; needsInvalidateLayer = YES; } @@ -417,7 +417,7 @@ - (void)prepareForRecycle self.layer.transform = RCTCATransform3DFromTransformMatrix(props.transform); } if ([_propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN containsObject:@"opacity"]) { - self.layer.opacity = (CGFloat)props.opacity; + self.layer.opacity = (float)props.opacity; } _propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN = nil;