TAChart: Less hints and warnings.

This commit is contained in:
wp_xyz 2021-08-08 00:20:43 +02:00
parent 2d381f05b1
commit accd76af5c
14 changed files with 26 additions and 7 deletions

View File

@ -12,7 +12,7 @@
unit TAChartAxis;
{$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface
uses

View File

@ -10,7 +10,7 @@
unit TAChartAxisUtils;
{$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface
uses

View File

@ -11,7 +11,7 @@
unit TADbSource;
{$H+}
{$WARN 6058 off : Call to subroutine "$1" marked as inline is not inlined}
interface
uses

View File

@ -550,6 +550,7 @@ begin
case FAlignment of
taCenter: p += RotatePointX((FWidth - lineExtent.X) div 2, a);
taRightJustify: p += RotatePointX(FWidth - lineExtent.X, a);
taLeftJustify: ;
end;
case FTextFormat of
tfNormal: FSimpleTextOut.SimpleTextOut(p.X, p.Y, FText2[i]);

View File

@ -1825,7 +1825,7 @@ begin
fitOverflow : Result := rsErrNumericalOverflow;
else
raise EChartError.CreateFmt('[%s.ErrorMsg] No message text assigned to error code #%d.',
[NameOrClassName(self), ord(ErrCode)]);
[NameOrClassName(self), ord(ErrCode)]){%H-};
end;
end;
@ -2475,7 +2475,7 @@ begin
Add(255, 0, '', clWhite);
end;
else
raise EChartError.CreateFmt('[%s.BuildPalette] Palette not supported', [NameOrClassName(Self)]);
raise EChartError.CreateFmt('[%s.BuildPalette] Palette not supported', [NameOrClassName(Self)]){%H-};
end;
if FPaletteMin < FPaletteMax then begin
@ -2749,6 +2749,8 @@ begin
lmPoint:
if (ColorSource <> nil) and (ColorSource.Count > 0) then
MakePointItems;
lmStyle:
raise EChartError.Create('[TCustomColorMapSeries.GetLegendItems] Unhandled Legend.Multiplicity');
end;
end;

View File

@ -304,21 +304,25 @@ begin
cotFirst: AdjustX(AA, ARect.a.X);
cotSecond: AdjustX(AB, ARect.a.X);
cotBoth: exit(false);
cotNone: ;
end;
case CASE_OF_TWO[AA.X > ARect.b.X, AB.X > ARect.b.X] of
cotFirst: AdjustX(AA, ARect.b.X);
cotSecond: AdjustX(AB, ARect.b.X);
cotBoth: exit(false);
cotNone: ;
end;
case CASE_OF_TWO[AA.Y < ARect.a.Y, AB.Y < ARect.a.Y] of
cotFirst: AdjustY(AA, ARect.a.Y);
cotSecond: AdjustY(AB, ARect.a.Y);
cotBoth: exit(false);
cotNone: ;
end;
case CASE_OF_TWO[AA.Y > ARect.b.Y, AB.Y > ARect.b.Y] of
cotFirst: AdjustY(AA, ARect.b.Y);
cotSecond: AdjustY(AB, ARect.b.Y);
cotBoth: exit(false);
cotNone: ;
end;
Result := true;
end;

View File

@ -1184,6 +1184,7 @@ begin
case AAlign of
calLeft: AAlign := calRight;
calRight: AAlign := calLeft;
else ;
end;
Result := FAxisList.GetAxisByAlign(AAlign);
end;

View File

@ -240,6 +240,7 @@ begin
if FBestStepCoeff <= 10 then
Result := StartOfTheYear(AValue);
dtsMonth: Result := StartOfTheMonth(AValue);
else ;
end;
end;

View File

@ -994,6 +994,7 @@ begin
laTopRight : Alignment := laTopLeft;
laCenterRight : Alignment := laCenterLeft;
laBottomRight : Alignment := laBottomLeft;
else ;
end;
end;

View File

@ -747,6 +747,8 @@ begin
ps.Color := SliceColor(i);
AItems.Add(ps);
end;
lmStyle:
raise Exception.Create('[TCustomPieSeries.GetLegendItems] lmStyle cannot be used here.');
end;
end;

View File

@ -613,6 +613,8 @@ var
pPrev := p;
pPrevNan := pNan;
end;
else
raise EChartError.Create('[TLineSeries.DrawSingleLineInStack] Unhandled LineType');
end;
breaks[breakCount] := pointCount;
breakCount += 1;
@ -716,6 +718,8 @@ var
end;
ltFromOrigin:
ADrawer.Line(origin, imgPt2);
else
raise EChartError.Create('[TLineSeries.DrawSingleLineInStack] Unhandled LineType');
end;
end;
imgPt1 := imgPt2;
@ -1220,7 +1224,7 @@ begin
bwPercent: r := GetXRange(AX, AIndex) * PERCENT;
bwPercentMin: r := FMinXRange * PERCENT;
else
raise EBarError.Create('BarWidthStyle not implemented');
raise EBarError.Create('BarWidthStyle not implemented'){%H-};
end;
AOffset := r * BarOffsetPercent;
AWidth := r * BarWidthPercent / 2;
@ -1804,7 +1808,7 @@ begin
bsHexPrism:
FDrawBarProc := @DrawHexPrism;
else
raise EBarError.Create('[TBarSeries.SetBarShape] No drawing procedure for bar shape.');
raise EBarError.Create('[TBarSeries.SetBarShape] No drawing procedure for bar shape.'){%H-};
end;
UpdateParentChart;
end;

View File

@ -1541,6 +1541,7 @@ begin
end;
camDerivative, camSmoothDerivative:
CalcDerivative(AIndex);
else ;
end;
FIndex := AIndex;
end;

View File

@ -743,6 +743,7 @@ begin
case Alignment of
taLeftJustify : Alignment := taRightJustify;
taRightJustify : Alignment := taLeftJustify;
taCenter: ;
end;
end;

View File

@ -470,6 +470,7 @@ procedure TSeriesPointer.DrawSize(ADrawer: IChartDrawer;
case AStyle of
psHexagon : begin dPhi := pi / 3; SetLength(p, 7); end;
psFullStar : begin dPhi := pi / 6; SetLength(p, 13); end;
else ;
end;
phi := 0;
for i := 0 to High(p) do