You've already forked lazarus-ccr
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:
@ -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
|
||||
|
@ -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
|
||||
]);
|
||||
|
@ -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
|
||||
|
@ -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 +
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 +
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
||||
|
Reference in New Issue
Block a user