Changeset 76 for Generics/TemplateGenerics/Generic/StackImplementation.tpl
- Timestamp:
- Oct 29, 2010, 7:49:29 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Generic/StackImplementation.tpl
r73 r76 5 5 procedure TGStack.Push(Value: TStackItem); 6 6 begin 7 Add(Value);7 FList.Add(Value); 8 8 end; 9 9 10 10 function TGStack.Pop: TStackItem; 11 11 begin 12 Result := Extract(Last);12 Result := FList.Extract(FList.Last); 13 13 end; 14 14 15 constructor TGStack.Create; 16 begin 17 FList := TGList.Create; 18 end; 19 20 destructor TGStack.Destroy; 21 begin 22 FList.Free; 23 inherited Destroy; 24 end; 25
Note:
See TracChangeset
for help on using the changeset viewer.