2
0
Эх сурвалжийг харах

* Added Exchange to TCollection. Bug ID #15517

git-svn-id: trunk@15012 -
michael 15 жил өмнө
parent
commit
f29973cc71

+ 1 - 0
rtl/objpas/classes/classesh.inc

@@ -505,6 +505,7 @@ type
     function GetNamePath: string; override;
     function GetNamePath: string; override;
     function Insert(Index: Integer): TCollectionItem;
     function Insert(Index: Integer): TCollectionItem;
     function FindItemID(ID: Integer): TCollectionItem;
     function FindItemID(ID: Integer): TCollectionItem;
+    procedure Exchange(Const Index1, index2: integer);
     procedure Sort(Const Compare : TCollectionSortCompare);
     procedure Sort(Const Compare : TCollectionSortCompare);
     property Count: Integer read GetCount;
     property Count: Integer read GetCount;
     property ItemClass: TCollectionItemClass read FItemClass;
     property ItemClass: TCollectionItemClass read FItemClass;

+ 6 - 0
rtl/objpas/classes/collect.inc

@@ -389,6 +389,12 @@ begin
   end;
   end;
 end;
 end;
 
 
+procedure TCollection.Exchange(Const Index1, index2: integer);
+
+begin
+  FItems.Exchange(Index1,Index2);
+end;
+
 
 
 {****************************************************************************}
 {****************************************************************************}
 {*                             TOwnedCollection                             *}
 {*                             TOwnedCollection                             *}