TAChart: Use $PUSH/$POP instead of $IFDEFs to restore compiler options in SafeInfinity

git-svn-id: trunk@32306 -
This commit is contained in:
ask 2011-09-13 03:45:55 +00:00
parent d48b6c597d
commit 5e47f77c8b

View File

@ -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;