mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-16 06:10:34 +01:00
* Add QWord version of Max (Delphi compatibility, bug ID #34364)
git-svn-id: trunk@39995 -
This commit is contained in:
parent
ab159c638c
commit
863ede7dc6
@ -1751,7 +1751,7 @@ end;
|
||||
|
||||
procedure propagate_prec(var result, op1, op2: MPFloat);
|
||||
begin
|
||||
f_set_prec(result, max(valsint(f_get_prec(op1)), f_get_prec(op2)));
|
||||
f_set_prec(result, max( int64(f_get_prec(op1)), Int64(f_get_prec(op2)) ) );
|
||||
end;
|
||||
|
||||
// --- ext bindings ----
|
||||
|
||||
@ -165,6 +165,8 @@ function Max(a, b: Cardinal): Cardinal; overload;
|
||||
}
|
||||
function Min(a, b: Int64): Int64;inline; overload;
|
||||
function Max(a, b: Int64): Int64;inline; overload;
|
||||
function Min(a, b: QWord): QWord;inline; overload;
|
||||
function Max(a, b: QWord): QWord;inline; overload;
|
||||
{$ifdef FPC_HAS_TYPE_SINGLE}
|
||||
function Min(a, b: Single): Single;inline; overload;
|
||||
function Max(a, b: Single): Single;inline; overload;
|
||||
@ -2056,6 +2058,22 @@ begin
|
||||
Result := b;
|
||||
end;
|
||||
|
||||
function Min(a, b: QWord): QWord; inline;
|
||||
begin
|
||||
if a < b then
|
||||
Result := a
|
||||
else
|
||||
Result := b;
|
||||
end;
|
||||
|
||||
function Max(a, b: QWord): Qword;inline;
|
||||
begin
|
||||
if a > b then
|
||||
Result := a
|
||||
else
|
||||
Result := b;
|
||||
end;
|
||||
|
||||
{$ifdef FPC_HAS_TYPE_SINGLE}
|
||||
function Min(a, b: Single): Single;inline;
|
||||
begin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user