TAChart: Remove "not initialized" warnings.

git-svn-id: trunk@63574 -
This commit is contained in:
wp 2020-07-16 20:11:06 +00:00
parent f504fdbac9
commit fcdba55052
13 changed files with 55 additions and 55 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions BuildModesCount="1">
<ProjectOptions>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
@ -18,7 +18,7 @@
<Macro1 Name="LCLWidgetType" Value="nogui"/>
</MacroValues>
<BuildModes>
<Item1 Name="Default" Default="True"/>
<Item Name="default" Default="True"/>
<SharedMatrixOptions Count="1">
<Item1 ID="909616661520" Modes="Default" Type="IDEMacro" MacroName="LCLWidgetType" Value="nogui"/>
</SharedMatrixOptions>
@ -28,24 +28,20 @@
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
<Modes>
<Mode Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="1">
<Item1>
<RequiredPackages>
<Item>
<PackageName Value="TAChartLazarusPkg"/>
</Item1>
</Item>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Units>
<Unit>
<Filename Value="noguidemo.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="..\..\tadrawerfpcanvas.pas"/>
<IsPartOfProject Value="True"/>
</Unit1>
</Unit>
</Units>
</ProjectOptions>
<CompilerOptions>
@ -70,16 +66,16 @@
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Exceptions>
<Item>
<Name Value="EAbort"/>
</Item1>
<Item2>
</Item>
<Item>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
</Item>
<Item>
<Name Value="EFOpenError"/>
</Item3>
</Item>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -6,7 +6,7 @@ uses
{$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF}
Interfaces, Classes, tachartlazaruspkg { you can add units after this },
FPCanvas, FPImage, FPImgCanv,
TAGraph, TASeries, TADrawerFPCanvas in '../../TADrawerFPCanvas.pas', TADrawerCanvas, TADrawUtils;
TAGraph, TASeries, TADrawerCanvas, TADrawUtils, TADrawerFPCanvas;
const
{$IFDEF MSWINDOWS}

View File

@ -854,7 +854,7 @@ end;
procedure TBroadcaster.Broadcast(ASender: TObject);
var
ListCopy: array of Pointer;
ListCopy: array of Pointer = nil;
Exceptions: TStringList;
Aborted: Boolean;
i: Integer;
@ -1002,7 +1002,7 @@ function TPublishedIntegerSet.AsBooleans(ACount: Integer): TBooleanDynArray;
var
i: Integer;
begin
SetLength(Result, ACount);
SetLength(Result{%H-}, ACount);
if ACount = 0 then exit;
if AllSet then
FillChar(Result[0], Length(Result), true)

View File

@ -341,7 +341,7 @@ var
SaveListEpsilon: Double;
a, b: Double;
i, j: Integer;
points: array of Double;
points: array of Double = nil;
begin
if ADomain.IntervalCount = 0 then
exit;

View File

@ -131,7 +131,7 @@ function CalcBestFitValues(const x, y: TArbFloatArray; n, m: Integer;
var
i, j: Integer;
begin
SetLength(Result, Length(y));
SetLength(Result{%H-}, Length(y));
for i := 0 to n - 1 do begin
Result[i] := 0.0;
for j := 0 to m - 1 do
@ -202,11 +202,11 @@ end;
function LinearFit(const x, y, dy: TArbFloatArray;
FitParams: TFitParamArray): TFitResults;
var
alpha: TArbFloatArray;
beta: TArbFloatArray;
xx: TArbFloatArray;
funcs: TArbFloatArray;
list: Array of Integer;
alpha: TArbFloatArray = nil;
beta: TArbFloatArray = nil;
xx: TArbFloatArray = nil;
funcs: TArbFloatArray = nil;
list: Array of Integer = nil;
ycalc: TArbFloatArray;
fp: TFitParam;
n, m, mfit: Integer;
@ -216,7 +216,7 @@ var
ca: ArbFloat = 0.0;
term: ArbInt = 0;
begin
SetLength(Result.ParamValues, 0);
SetLength(Result{%H-}.ParamValues, 0);
SetLength(Result.CovarianceMatrix, 0);
// Check parameters

View File

@ -945,7 +945,7 @@ end;
function TBSplineSeries.Calculate(AX: Double): Double;
var
p: array of TDoublePoint;
p: array of TDoublePoint = nil;
startIndex: Integer;
splineStart: Integer = 0;
splineEnd: Integer = -2;
@ -981,8 +981,9 @@ var
var
i,n: Integer;
pp: TDoublePoint;
xval, yval: array of ArbFloat;
coeff: array of ArbFloat;
xval: array of ArbFloat = nil;
yval: array of ArbFloat = nil;
coeff: array of ArbFloat = nil;
ok: Integer;
t: ArbFloat;
begin
@ -1055,7 +1056,7 @@ end;
procedure TBSplineSeries.Draw(ADrawer: IChartDrawer);
var
p: array of TDoublePoint;
p: array of TDoublePoint = nil;
startIndex: Integer;
splineStart: Integer;
splineEnd: Integer;
@ -1789,7 +1790,7 @@ end;
function TFitSeries.EquationText: IFitEquationText;
var
basis: Array of string;
basis: Array of string = nil;
i: Integer;
begin
if State = fpsValid then begin
@ -1840,7 +1841,9 @@ var
procedure TryFit;
var
i, j, ns, n: Integer;
xv, yv, dy: array of ArbFloat;
xv: array of ArbFloat = nil;
yv: array of ArbFloat = nil;
dy: array of ArbFloat = nil;
yp, yn: Double;
fitRes: TFitResults;
hasErrorBars: Boolean;
@ -1946,7 +1949,7 @@ function TFitSeries.FitParams: TDoubleDynArray;
var
i: Integer;
begin
SetLength(Result, ParamCount);
SetLength(Result{%H-}, ParamCount);
for i := 0 to High(Result) do
Result[i] := Param[i];
end;

View File

@ -124,7 +124,7 @@ var
i: Integer;
begin
Assert(ANumPts >= 0);
SetLength(Result, ANumPts);
SetLength(Result{%H-}, ANumPts);
for i := 0 to ANumPts - 1 do
Result[i] := APoints[i + AStartIndex];
end;
@ -692,7 +692,7 @@ end;
function TesselateRect(const ARect: TRect): TPointArray;
begin
SetLength(Result, 4);
SetLength(Result{%H-}, 4);
with ARect do begin
Result[0] := TopLeft;
Result[1] := Point(Left, Bottom);

View File

@ -451,7 +451,7 @@ var
var
next_angle: Double;
begin
SetLength(APoints, 0);
SetLength(APoints{%H-}, 0);
next_angle := ASlice.FixedNextAngle;
CalcArcPoints(ASlice, ASlice.FPrevAngle, next_angle, FRadius, APoints);
CalcArcPoints(ASlice, ASlice.FPrevAngle, next_angle, innerRadius, APoints);
@ -470,7 +470,7 @@ var
procedure DrawArc3D(ASlice: TPieSlice; AInside: Boolean);
var
i, numSteps: Integer;
p: Array of TPoint;
p: Array of TPoint = nil;
angle1, angle2: Double;
clr: TColor;
r: Integer;
@ -585,7 +585,7 @@ var
procedure DrawEdge3D(ASlice: TPieSlice; Angle: Double; APart: TSlicePart);
var
P1, P2, ofs: TPoint;
p: TPointArray;
p: TPointArray = nil;
begin
ADrawer.SetBrushParams(
bsSolid, GetDepthColor(SliceColor(ASlice.FOrigIndex)));
@ -1035,7 +1035,7 @@ var
i, j: Integer;
compareFunc: TAngleFunc;
begin
SetLength(ASlices, Length(FSlices) + 1);
SetLength(ASlices{%H-}, Length(FSlices) + 1);
j := 0;
for i:=0 to High(FSlices) do begin
if FSlices[i].Angle >= pi then begin

View File

@ -1267,7 +1267,7 @@ var
ext2: TDoubleRect;
w: Double;
p: TDoublePoint;
heights: TDoubleDynArray;
heights: TDoubleDynArray = nil;
procedure BuildBar(x, y1, y2: Double);
var
@ -1463,7 +1463,7 @@ var
cx, cy: Integer;
w, h: Integer;
c: TColor;
pts: array of TPoint;
pts: array of TPoint = nil;
i, j: Integer;
begin
if IsRotated then begin
@ -1518,7 +1518,7 @@ const
PYRAMID_3D: array[0..3] of TPoint = ((X:0; Y:0), (X:1; Y:0), (X:1; Y:1), (X:0; Y:1));
var
c: TColor;
pts: TPointArray;
pts: TPointArray = nil;
i: Integer;
depth2: Integer;
w, h: Integer;
@ -1659,7 +1659,7 @@ var
graphClickPt: TDoublePoint;
sp: TDoublePoint;
ofs, w: Double;
heights: TDoubleDynArray;
heights: TDoubleDynArray = nil;
y: Double;
stackindex: Integer;
begin
@ -1930,10 +1930,11 @@ end;
procedure TAreaSeries.Draw(ADrawer: IChartDrawer);
var
pts, basePts: TPointArray;
pts: TPointArray = nil;
basePts: TPointArray = nil;
numPts, numBasePts: Integer;
scaled_depth: Integer;
missing: array of Integer;
missing: array of Integer = nil;
numMissing: Integer;
zero: Double;
ext, ext2: TDoubleRect;

View File

@ -1705,7 +1705,7 @@ procedure TCalculatedChartSource.ExtractItem(AIndex: Integer);
end;
var
t: TDoubleDynArray;
t: TDoubleDynArray = nil;
i: Integer;
begin
FItem := Origin[AIndex]^;

View File

@ -1063,7 +1063,7 @@ function TChartToolset.Dispatch(
AChart: TChart; AEventId: TChartToolEventId;
AShift: TShiftState; APoint: TPoint): Boolean;
var
candidates: array of TChartTool;
candidates: array of TChartTool = nil;
candidateCount: Integer;
procedure AddCandidate(AIndex: Integer);

View File

@ -435,7 +435,7 @@ procedure TSeriesPointer.DrawSize(ADrawer: IChartDrawer;
procedure DrawByString(const AStr: String);
var
pts: array of TPoint;
pts: array of TPoint = nil;
i: Integer;
j: Integer = 0;
notClosed: Boolean;
@ -461,7 +461,7 @@ procedure TSeriesPointer.DrawSize(ADrawer: IChartDrawer;
const
INNER = 0.5;
var
p: array of TPoint;
p: array of TPoint = nil;
pt: TDoublePoint;
phi, sinphi, cosphi, dPhi: Math.float;
i: Integer;

Binary file not shown.