* Reduce number of warnings and hints

This commit is contained in:
Michaël Van Canneyt 2024-08-09 17:59:45 +02:00
parent 92f937c40e
commit 780c1f9c49
4 changed files with 16 additions and 4 deletions

View File

@ -135,7 +135,7 @@ type
TEnumerator<T> = class abstract
protected
function DoGetCurrent: T; virtual; abstract;
function DoMoveNext: boolean; virtual; abstract;
function DoMoveNext: boolean; virtual;
public
property Current: T read DoGetCurrent;
function MoveNext: boolean;
@ -1272,6 +1272,7 @@ var
CurLen,Dest,i: SizeInt;
begin
Result:=Nil;
TotalLen:=0;
for i:=0 to Length(Args)-1 do
Inc(TotalLen,Length(Args[i]));
@ -1349,6 +1350,11 @@ end;
{ TEnumerator<T> }
function TEnumerator<T>.DoMoveNext: boolean;
begin
Result:=False;
end;
function TEnumerator<T>.MoveNext: boolean;
begin
Exit(DoMoveNext);

View File

@ -894,8 +894,8 @@ type
FHashFactory: THashFactoryClass;
public
constructor Create(AHashFactoryClass: THashFactoryClass);
function Equals(const ALeft, ARight: T): Boolean;
function GetHashCode(const AValue: T): UInt32;
function Equals(const ALeft, ARight: T): Boolean; reintroduce;
function GetHashCode(const AValue: T): UInt32; reintroduce;
end;
TBinaryExtendedEqualityComparer<T> = class(TBinaryEqualityComparer<T>, IExtendedEqualityComparer<T>)

View File

@ -171,6 +171,12 @@ begin
Result := GetCurrent;
end;
function TCustomDictionaryEnumerator<T, CUSTOM_DICTIONARY_CONSTRAINTS>.GetCurrent: T;
begin
Result:=Default(T);
end;
{ TDictionaryEnumerable<TDictionaryEnumerator, TDictionaryPointersEnumerator, T, CUSTOM_DICTIONARY_CONSTRAINTS> }
function TDictionaryEnumerable<TDictionaryEnumerator, TDictionaryPointersEnumerator, T, CUSTOM_DICTIONARY_CONSTRAINTS>.GetPtrEnumerator: TEnumerator<PT>;

View File

@ -116,7 +116,7 @@ type
FIndex: SizeInt;
protected
function DoGetCurrent: T; override;
function GetCurrent: T; virtual; abstract;
function GetCurrent: T; virtual;
public
constructor Create(ADictionary: TCustomDictionary<CUSTOM_DICTIONARY_CONSTRAINTS>);
end;