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

@ -123,7 +123,7 @@ begin
VarList.BorderSpacing.Bottom + nPerCellEdit.Height +
ButtonBevel.Height + CloseBtn.BorderSpacing.Top + CloseBtn.Height;
ParamsPanel.Constraints.MinWidth := MaxValue([
ParamsPanel.Constraints.MinWidth := MaxValueI([
4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left,
MaxValue([ACodeLabel.Width, BCodeLabel.Width, CCodeLabel.Width, DCodeLabel.Width,
GrpCodeLabel.Width, DepVarlabel.Width])*2 + AInBtn.Width + 2*VarList.BorderSpacing.Right

View File

@ -147,7 +147,7 @@ begin
begin
inherited;
ParamsPanel.Constraints.MinWidth := MaxValue([
ParamsPanel.Constraints.MinWidth := MaxValueI([
GroupBox2.Left + GroupBox2.Width,
4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left
]);

View File

@ -116,7 +116,7 @@ procedure TABCLogLinearForm.AdjustConstraints;
begin
inherited;
ParamsPanel.Constraints.MinWidth := MaxValue([
ParamsPanel.Constraints.MinWidth := MaxValueI([
FileFromGrp.Width,
NSlicesEdit.Left + NSlicesEdit.Width,
4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left

View File

@ -125,7 +125,7 @@ uses
procedure TLogLinScreenForm.AdjustConstraints;
begin
inherited;
ParamsPanel.Constraints.MinWidth := MaxValue([
ParamsPanel.Constraints.MinWidth := MaxValueI([
4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left,
OptionsGroup.Width,
Label2.Width * 2 + AllBtn.Width + 2*varList.BorderSpacing.Right +

View File

@ -89,7 +89,7 @@ const
procedure TTwoWayLogLinForm.AdjustConstraints;
begin
inherited;
ParamsPanel.Constraints.MinWidth := MaxValue([
ParamsPanel.Constraints.MinWidth := MaxValueI([
4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left,
FileFromGrp.Width,
NoColsEdit.Left + NoColsEdit.Width

View File

@ -70,7 +70,7 @@ end;
procedure TGroupFreqForm.AdjustConstraints;
begin
ParamsPanel.Constraints.MinWidth := MaxValue( [
ParamsPanel.Constraints.MinWidth := MaxValueI( [
4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left,
(PlotOptionsGroup.Width - GrpInBtn.Width div 2 + GrpVarEdit.BorderSpacing.Left)*2,
(Max(Label1.Width, Label2.Width) + GrpvarEdit.BorderSpacing.Left) * 2

View File

@ -72,7 +72,7 @@ begin
RelList.Width := Max(Label3.Width, Label4.Width);
WeightList.Width := RelList.Width;
ParamsPanel.Constraints.MinWidth := MaxValue([
ParamsPanel.Constraints.MinWidth := MaxValueI([
GroupBox1.Width,
4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left,
Max(Label1.Width, Label2.Width)*2 + 2*RelList.Width +

View File

@ -174,7 +174,7 @@ procedure TChiSqrForm.AdjustConstraints;
begin
inherited;
ParamsPanel.Constraints.MinWidth := MaxValue([
ParamsPanel.Constraints.MinWidth := MaxValueI([
4*CloseBtn.Width + 3*CloseBtn.BorderSpacing.Left,
OptionsGroup.Width,
InputGrp.Width

View File

@ -144,7 +144,7 @@ procedure TRIDITForm.AdjustConstraints;
begin
inherited;
ParamsPanel.Constraints.MinWidth := MaxValue([
ParamsPanel.Constraints.MinWidth := MaxValueI([
CloseBtn.Width * 4 + CloseBtn.BorderSpacing.Left * 3,
OptionsGroup.Width,
AlphaEdit.Left + AlphaEdit.Width

View File

@ -240,6 +240,8 @@ begin
OS3MainFrm.DataGrid.Cells[col,i] := format('%.3f',[RealRnd]);
end;
end;
else
raise Exception.Create('DistType not imlemented.');
end;
NoVariables := col;
@ -310,7 +312,7 @@ begin
end;
}
else
raise Exception.Create('Unsupported distribution type.');
raise Exception.Create('Unsupported distribution type.'){%H-};
end;
end;

View File

@ -136,9 +136,6 @@ implementation
uses
Math;
const
TWO_PI = 2.0 * pi; // redeclaration to avoid dependence on MathUnit
operator + (A, B: TDblVector): TDblVector;
var
i, n: Integer;

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.