We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6b87b1 commit 015c9beCopy full SHA for 015c9be
TeeGenericTree.pas
@@ -143,14 +143,8 @@ function TNode<T>.Add(const AData: T): TNode<T>;
143
end;
144
145
procedure TNode<T>.Clear;
146
-var t : TInteger;
147
begin
148
- for t:=0 to Count-1 do
149
- begin
150
- FItems[t].FParent:=nil;
151
- FItems[t].Free;
152
- end;
153
-
+ Delete(0,Count);
154
FItems:=nil;
155
156
@@ -196,12 +190,12 @@ function TNode<T>.Get(Index: TInteger): TNode<T>;
196
190
function TNode<T>.GetIndex: TInteger;
197
191
var t : Integer;
198
192
199
- result:=-1;
200
201
193
if FParent<>nil then
202
194
for t:=0 to FParent.Count-1 do
203
195
if FParent[t]=Self then
204
Exit(t);
+
+ result:=-1;
205
206
207
function TNode<T>.GetLevel: TInteger;
0 commit comments