From 4a995324b0693cd9f00cfdd2bbf7d9b375c5f21e Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 17 Feb 2012 20:46:12 +1100 Subject: Xcode analyze could not understand treating a 2D array as a 1D array so treat as a 2D array. --- cocoa/PlatCocoa.mm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cocoa') diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 300af3775..f584107a7 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -577,11 +577,13 @@ void SurfaceImpl::RoundedRectangle(PRectangle rc, ColourDesired fore, ColourDesi }; // Align the points in the middle of the pixels - for( int i = 0; i < 4*3; ++ i ) + for( int i = 0; i < 4; ++ i ) { - CGPoint* c = (CGPoint*) corners; - c[i].x += 0.5; - c[i].y += 0.5; + for( int j = 0; j < 3; ++ j ) + { + corners[i][j].x += 0.5; + corners[i][j].y += 0.5; + } } PenColour( fore ); -- cgit v1.2.3