From e2e9c959e06ec2679347bcc382866ff59334630d Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 11 Nov 2015 14:45:28 +0000 Subject: [PATCH] lcl: less with-blocks for FPC 3.1.1 git-svn-id: trunk@50303 - --- lcl/interfaces/carbon/carbonprivate.pp | 2 +- lcl/interfaces/carbon/carbonthemes.pas | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lcl/interfaces/carbon/carbonprivate.pp b/lcl/interfaces/carbon/carbonprivate.pp index 5429a40aba..de7508671e 100644 --- a/lcl/interfaces/carbon/carbonprivate.pp +++ b/lcl/interfaces/carbon/carbonprivate.pp @@ -1218,7 +1218,7 @@ begin CGContextSaveGState(Context); CGContextSetRGBFillColor(Context, (c and $FF) * rgbkoef, ((c shr 8) and $FF)*rgbkoef, ((c shr 16) and $FF)*rgbkoef, 1); - with b do CGContextFillRect(Context, RectToCGRect(Bounds(0,0, Right-Left, Bottom-Top))); + CGContextFillRect(Context, RectToCGRect(Bounds(0,0, b.Right-b.Left, b.Bottom-b.Top))); CGContextRestoreGState(Context); end; end; diff --git a/lcl/interfaces/carbon/carbonthemes.pas b/lcl/interfaces/carbon/carbonthemes.pas index aba740748c..bc2d365271 100644 --- a/lcl/interfaces/carbon/carbonthemes.pas +++ b/lcl/interfaces/carbon/carbonthemes.pas @@ -601,11 +601,8 @@ begin WindowShape:=nil; HIThemeGetWindowShape(BtnRect, WindowDrawInfo, kWindowCloseBoxRgn, WindowShape); HIShapeGetBounds(WindowShape, BtnRect); - with BtnRect.size do - begin - Result.cx := Round(width); - Result.cy := Round(height); - end; + Result.cx := Round(BtnRect.size.width); + Result.cy := Round(BtnRect.size.height); end else Result := inherited GetDetailSize(Details); else