mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 19:19:30 +01:00
rtl: override TObject.Equals for TBits and TStrings classes
git-svn-id: trunk@14013 -
This commit is contained in:
parent
2c906dd4a1
commit
8292fcc49e
@ -232,6 +232,14 @@ begin
|
||||
FBits^[loop] := FBits^[loop] xor bitset.FBits^[loop];
|
||||
end;
|
||||
|
||||
function TBits.Equals(Obj : TObject): Boolean;
|
||||
begin
|
||||
if Obj is TBits then
|
||||
Result := Equals(TBits(Obj))
|
||||
else
|
||||
Result := inherited Equals(Obj);
|
||||
end;
|
||||
|
||||
function TBits.equals(bitset : TBits) : Boolean;
|
||||
var
|
||||
n : longint;
|
||||
|
||||
@ -360,7 +360,8 @@ type
|
||||
procedure NotBits(BitSet : TBits);
|
||||
function Get(Bit : longint) : boolean;
|
||||
procedure Grow(NBit : longint);
|
||||
function Equals(BitSet : TBits) : Boolean;
|
||||
function Equals(Obj : TObject): Boolean; override; overload;
|
||||
function Equals(BitSet : TBits) : Boolean; overload;
|
||||
procedure SetIndex(Index : longint);
|
||||
function FindFirstBit(State : boolean) : longint;
|
||||
function FindNextBit : longint;
|
||||
@ -600,7 +601,8 @@ type
|
||||
procedure Clear; virtual; abstract;
|
||||
procedure Delete(Index: Integer); virtual; abstract;
|
||||
procedure EndUpdate;
|
||||
function Equals(TheStrings: TStrings): Boolean;
|
||||
function Equals(Obj: TObject): Boolean; override; overload;
|
||||
function Equals(TheStrings: TStrings): Boolean; overload;
|
||||
procedure Exchange(Index1, Index2: Integer); virtual;
|
||||
function GetEnumerator: TStringsEnumerator;
|
||||
function GetText: PChar; virtual;
|
||||
|
||||
@ -653,6 +653,17 @@ end;
|
||||
|
||||
|
||||
|
||||
Function TStrings.Equals(Obj: TObject): Boolean;
|
||||
|
||||
begin
|
||||
if Obj is TStrings then
|
||||
Result := Equals(TStrings(Obj))
|
||||
else
|
||||
Result := inherited Equals(Obj);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
Function TStrings.Equals(TheStrings: TStrings): Boolean;
|
||||
|
||||
Var Runner,Nr : Longint;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user