From a0ffb9965abaa64b816775b86a699da5addfcb62 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 11 Nov 2015 13:39:48 +0000 Subject: [PATCH] lcl: less with-blocks for FPC 3.1.1 git-svn-id: trunk@50297 - --- .../customdrawn/customdrawnwinapi_win.inc | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/lcl/interfaces/customdrawn/customdrawnwinapi_win.inc b/lcl/interfaces/customdrawn/customdrawnwinapi_win.inc index 7e9e36afff..92e7eb52fa 100644 --- a/lcl/interfaces/customdrawn/customdrawnwinapi_win.inc +++ b/lcl/interfaces/customdrawn/customdrawnwinapi_win.inc @@ -2356,11 +2356,9 @@ begin Result := customdrawn_winproc.GetWindowInfo(Handle, @Info); if Result then begin - with Info.rcWindow do - begin - Width := Right - Left; - Height := Bottom - Top; - end; + R:=Info.rcWindow; + Width := R.Right - R.Left; + Height := R.Bottom - R.Top; Width := Width - 2 * Integer(Info.cxWindowBorders); Height := Height - 2 * Integer(Info.cyWindowBorders); ExcludeCaption; @@ -2368,18 +2366,14 @@ begin Exit; end; Result := Boolean(Windows.GetWindowRect(lHandle, @R)); - with R do - begin - Width := Right - Left; - Height := Bottom - Top; - end; + Width := R.Right - R.Left; + Height := R.Bottom - R.Top; end - else - with WP.rcNormalPosition do - begin - Width := Right - Left; - Height := Bottom - Top; - end; + else begin + R:=WP.rcNormalPosition; + Width := R.Right - R.Left; + Height := R.Bottom - R.Top; + end; // convert top level lcl window coordinaties to win32 coord Info.dwStyle := DWORD(GetWindowLong(lHandle, GWL_STYLE));