From 23ebdb5faf3678e7d72a88bdebdbe2dc62291801 Mon Sep 17 00:00:00 2001 From: wp Date: Sun, 27 Jan 2019 11:28:43 +0000 Subject: [PATCH] TAChart: Combine {$hints on} and {$warnings on} with {$push} and {$pop} git-svn-id: trunk@60229 - --- components/tachart/tacustomsource.pas | 3 ++- components/tachart/tagraph.pas | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/tachart/tacustomsource.pas b/components/tachart/tacustomsource.pas index cd0746dbd9..ce31e145fe 100644 --- a/components/tachart/tacustomsource.pas +++ b/components/tachart/tacustomsource.pas @@ -1206,9 +1206,10 @@ begin while true do begin p := PChartValueText(lst[j - AStart]); lst[j - AStart] := nil; + {$PUSH} {$HINTS OFF} // Work around the fpc bug #19582. next := (PtrUInt(p) - PtrUInt(@AValues[0])) div SizeOf(p^); - {$HINTS ON} + {$POP} if next = i then break; AValues[j] := p^; j := next; diff --git a/components/tachart/tagraph.pas b/components/tachart/tagraph.pas index 5c15d37004..568daa9f52 100644 --- a/components/tachart/tagraph.pas +++ b/components/tachart/tagraph.pas @@ -1421,10 +1421,11 @@ var defaultDrawing: Boolean = true; begin FConnectorData.FBounds := GetClientRect; + {$PUSH} {$WARNINGS OFF} if Assigned(OnChartPaint) then OnChartPaint(Self, FConnectorData.FBounds, defaultDrawing); - {$WARNINGS ON} + {$POP} if defaultDrawing then with EffectiveGUIConnector do begin SetBounds(FConnectorData);