LazStats: Fix compilation with FPC 3.3.1/64-bit

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7956 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-01-03 23:50:51 +00:00
parent c6dc187de2
commit 86003527b0
12 changed files with 28 additions and 13 deletions

View File

@ -26,6 +26,8 @@ procedure ErrorMsg(const AMsg: String; const AParams: array of const);
function CenterString(S: String; Width: Integer): String;
function IndexOfString(L: StrDyneVec; s: String): Integer;
function MaxValueI(const AData: array of Integer): Integer;
implementation
@ -177,5 +179,19 @@ begin
end;
end;
// reimplements MaxValue of unit Math which cannot be compiled on 64 bit due
// to "Can't determine which overloaded function to call".
function MaxValueI(const AData: array of Integer): Integer;
var
i: Integer;
begin
Result := -MaxInt;
for i := 0 to High(AData) do
if Result > AData[i] then
Result := AData[i];
end;
end.