mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-30 17:56:13 +02:00
TAChart: Use overloaded operator= instead of LCLProc.CompareMethods
git-svn-id: trunk@22376 -
This commit is contained in:
parent
39dd7c35bd
commit
85a6d9eae3
@ -189,11 +189,12 @@ procedure Unused(const A1, A2);
|
||||
procedure UpdateMinMax(AValue: Double; var AMin, AMax: Double);
|
||||
|
||||
operator +(const A: TPoint; B: TSize): TPoint;
|
||||
operator =(const A, B: TMethod): Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
LCLIntf, LCLProc;
|
||||
LCLIntf;
|
||||
|
||||
procedure CalculateIntervals(
|
||||
AMin, AMax: Double; AxisScale: TAxisScale; out AStart, AStep: Double);
|
||||
@ -486,6 +487,11 @@ begin
|
||||
Result.Y := A.Y + B.cy;
|
||||
end;
|
||||
|
||||
operator = (const A, B: TMethod): Boolean;
|
||||
begin
|
||||
Result := (A.Code = B.Code) and (A.Data = B.Data);
|
||||
end;
|
||||
|
||||
{ TPenBrushFontRecall }
|
||||
|
||||
constructor TPenBrushFontRecall.Create(ACanvas: TCanvas; AParams: TPenBrushFont);
|
||||
@ -635,7 +641,7 @@ end;
|
||||
|
||||
procedure TIntervalList.SetOnChange(AValue: TNotifyEvent);
|
||||
begin
|
||||
if CompareMethods(TMethod(FOnChange), TMethod(AValue)) then exit;
|
||||
if TMethod(FOnChange) = TMethod(AValue) then exit;
|
||||
FOnChange := AValue;
|
||||
end;
|
||||
|
||||
|
@ -29,7 +29,7 @@ unit TASeries;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, Graphics, LCLProc,
|
||||
Classes, Graphics,
|
||||
TAChartUtils, TACustomSeries, TAGraph, TALegend, TATypes;
|
||||
|
||||
type
|
||||
@ -1114,7 +1114,7 @@ end;
|
||||
|
||||
procedure TFuncSeries.SetOnCalculate(const AValue: TFuncCalculateEvent);
|
||||
begin
|
||||
if CompareMethods(TMethod(FOnCalculate),TMethod(AValue)) then exit;
|
||||
if TMethod(FOnCalculate) = TMethod(AValue) then exit;
|
||||
FOnCalculate := AValue;
|
||||
UpdateParentChart;
|
||||
end;
|
||||
@ -1163,7 +1163,7 @@ end;
|
||||
|
||||
procedure TUserDrawnSeries.SetOnDraw(AValue: TSeriesDrawEvent);
|
||||
begin
|
||||
if CompareMethods(TMethod(FOnDraw),TMethod(AValue)) then exit;
|
||||
if TMethod(FOnDraw) = TMethod(AValue) then exit;
|
||||
FOnDraw := AValue;
|
||||
UpdateParentChart;
|
||||
end;
|
||||
|
@ -22,7 +22,7 @@ unit TASources;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, LCLProc, Graphics, SysUtils, TAChartUtils;
|
||||
Classes, Graphics, SysUtils, TAChartUtils;
|
||||
|
||||
type
|
||||
EEditableSourceRequired = class(EChartError);
|
||||
@ -783,7 +783,7 @@ end;
|
||||
procedure TUserDefinedChartSource.SetOnGetChartDataItem(
|
||||
const AValue: TGetChartDataItemEvent);
|
||||
begin
|
||||
if CompareMethods(TMethod(FOnGetChartDataItem),TMethod(AValue)) then exit;
|
||||
if TMethod(FOnGetChartDataItem) = TMethod(AValue) then exit;
|
||||
FOnGetChartDataItem := AValue;
|
||||
Reset;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user