Changeset 352 for trunk/Include/Classes/System
- Timestamp:
- Oct 4, 2007, 2:50:09 AM (17 years ago)
- Location:
- trunk/Include/Classes/System
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/Collections/Generic/List.ab
r344 r352 109 109 Return False 110 110 End If 111 112 RemoveAt( index ) 113 Return True 114 End Function 115 116 /*! 117 @brief List内の指定したインデックスの要素を削除する 118 @author Daisuke Yamamoto 119 @date 2007/10/03 120 @return 値が削除されたときはTrue、されなかったときはFlaseが返る 121 */ 122 Sub RemoveAt( index As Long ) 111 123 memmove( items + index*SizeOf(VoidPtr), items + (index+1)*SizeOf(VoidPtr), (size-(index+1))*SizeOf(VoidPtr) ) 112 124 Realloc( size - 1 ) 113 125 size-- 114 Return True 115 End Function 126 End Sub 116 127 End Class 117 128 -
trunk/Include/Classes/System/Delegate.ab
r340 r352 18 18 This.methodPtr = methodPtr 19 19 End Sub 20 21 Function IsEqual( sd As _SimpleDelegate ) As Boolean 22 Return ( This.hasThisPtr = sd.hasThisPtr and ObjPtr(This.object) = ObjPtr(sd.object) and This.methodPtr = sd.methodPtr ) 23 End Function 20 24 End Class 21 25 … … 28 32 For i=0 To ELM(dg.simpleDelegates.Count) 29 33 simpleDelegates.Add( dg.simpleDelegates[i] ) 34 Next 35 End Sub 36 37 Sub _Delete( dg As DelegateBase ) 38 Dim i As Long 39 For i=0 To ELM(This.simpleDelegates.Count) 40 Dim i2 As Long 41 Dim isExist = False 42 For i2=0 To ELM(dg.simpleDelegates.Count) 43 If This.simpleDelegates[i].IsEqual( dg.simpleDelegates[i2] ) Then 44 isExist = True 45 End If 46 Next 47 If isExist Then 48 This.simpleDelegates.RemoveAt( i ) 49 End If 30 50 Next 31 51 End Sub
Note:
See TracChangeset
for help on using the changeset viewer.