From 5e47f77c8b2186196d1992ef30356ce7a3347eaa Mon Sep 17 00:00:00 2001 From: ask Date: Tue, 13 Sep 2011 03:45:55 +0000 Subject: [PATCH] TAChart: Use $PUSH/$POP instead of $IFDEFs to restore compiler options in SafeInfinity git-svn-id: trunk@32306 - --- components/tachart/tachartutils.pas | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/tachart/tachartutils.pas b/components/tachart/tachartutils.pas index 1ec9e88038..145c46b7b7 100644 --- a/components/tachart/tachartutils.pas +++ b/components/tachart/tachartutils.pas @@ -437,11 +437,9 @@ end; function SafeInfinity: Double; begin - {$IFOPT R+}{$DEFINE RangeChecking}{$ELSE}{$UNDEF RangeChecking}{$ENDIF} - {$IFOPT Q+}{$DEFINE OverflowChecking}{$ELSE}{$UNDEF OverflowChecking}{$ENDIF} - {$R-}{$Q-} + {$PUSH}{$R-}{$Q-} Result := Infinity; - {$IFDEF OverflowChecking}{$Q+}{$ENDIF}{$IFDEF RangeChecking}{$R+}{$ENDIF} + {$POP} end; function SafeInRange(AValue, ABound1, ABound2: Double): Boolean;