From 2af1d898c1aa12d7f32ffc8ea324829a331fe521 Mon Sep 17 00:00:00 2001 From: Gabriele Mondada Date: Fri, 6 Apr 2018 19:21:43 +0200 Subject: [PATCH] fix use of C++ syntax in an header file that could be included from Obj-C and Swift --- .../RCTSurfaceHostingView.mm | 8 ++++---- .../RCTSurfaceSizeMeasureMode.h | 4 ++-- .../RCTSurfaceSizeMeasureMode.mm | 20 +++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm b/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm index 9eb41ff0b2d091..f8c3a5d6981391 100644 --- a/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +++ b/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm @@ -70,8 +70,8 @@ - (void)setFrame:(CGRect)frame RCTSurfaceMinimumSizeAndMaximumSizeFromSizeAndSizeMeasureMode( self.bounds.size, _sizeMeasureMode, - minimumSize, - maximumSize + &minimumSize, + &maximumSize ); [_surface setMinimumSize:minimumSize @@ -107,8 +107,8 @@ - (CGSize)sizeThatFits:(CGSize)size RCTSurfaceMinimumSizeAndMaximumSizeFromSizeAndSizeMeasureMode( size, _sizeMeasureMode, - minimumSize, - maximumSize + &minimumSize, + &maximumSize ); return [_surface sizeThatFitsMinimumSize:minimumSize diff --git a/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.h b/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.h index d463d36d091aff..ead7429b557419 100644 --- a/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.h +++ b/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.h @@ -28,6 +28,6 @@ typedef NS_OPTIONS(NSInteger, RCTSurfaceSizeMeasureMode) { RCT_EXTERN void RCTSurfaceMinimumSizeAndMaximumSizeFromSizeAndSizeMeasureMode( CGSize size, RCTSurfaceSizeMeasureMode sizeMeasureMode, - CGSize &minimumSize, - CGSize &maximumSize + CGSize *minimumSize, + CGSize *maximumSize ); diff --git a/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.mm b/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.mm index 5d1689b1b369a9..946b027d8c0ac1 100644 --- a/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.mm +++ b/React/Base/Surface/SurfaceHostingView/RCTSurfaceSizeMeasureMode.mm @@ -12,25 +12,25 @@ void RCTSurfaceMinimumSizeAndMaximumSizeFromSizeAndSizeMeasureMode( CGSize size, RCTSurfaceSizeMeasureMode sizeMeasureMode, - CGSize &minimumSize, - CGSize &maximumSize + CGSize *minimumSize, + CGSize *maximumSize ) { - minimumSize = CGSizeZero; - maximumSize = CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX); + *minimumSize = CGSizeZero; + *maximumSize = CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX); if (sizeMeasureMode & RCTSurfaceSizeMeasureModeWidthExact) { - minimumSize.width = size.width; - maximumSize.width = size.width; + minimumSize->width = size.width; + maximumSize->width = size.width; } else if (sizeMeasureMode & RCTSurfaceSizeMeasureModeWidthAtMost) { - maximumSize.width = size.width; + maximumSize->width = size.width; } if (sizeMeasureMode & RCTSurfaceSizeMeasureModeHeightExact) { - minimumSize.height = size.height; - maximumSize.height = size.height; + minimumSize->height = size.height; + maximumSize->height = size.height; } else if (sizeMeasureMode & RCTSurfaceSizeMeasureModeHeightAtMost) { - maximumSize.height = size.height; + maximumSize->height = size.height; } }