Changeset 340 for trunk/Include/Classes/System/Collections/Generic/List.ab
- Timestamp:
- Sep 28, 2007, 3:32:25 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/Collections/Generic/List.ab
r305 r340 97 97 size++ 98 98 End Sub 99 100 /*! 101 @brief List内で最初に出現する値を削除する 102 @author Daisuke Yamamoto 103 @date 2007/09/28 104 @return 値が削除されたときはTrue、されなかったときはFlaseが返る 105 */ 106 Function Remove( item As T ) As Boolean 107 Dim index = IndexOf( item ) 108 If index = -1 Then 109 Return False 110 End If 111 memmove( items + index*SizeOf(VoidPtr), items + (index+1)*SizeOf(VoidPtr), (size-(index+1))*SizeOf(VoidPtr) ) 112 Realloc( size - 1 ) 113 Return True 114 End Function 99 115 End Class 100 116
Note:
See TracChangeset
for help on using the changeset viewer.