Differences From Artifact [506ed04501]:
- File src/OFSortedList.m — part of check-in [2b5d03d8ea] at 2012-09-11 12:10:52 on branch trunk — Add -[OFList removeAllObjects]. (user: js, size: 1690) [annotate] [blame] [check-ins using]
To Artifact [e06bf0474a]:
- File
src/OFSortedList.m
— part of check-in
[4357c856cc]
at
2012-09-12 06:00:30
on branch trunk
— Make OFSortedList sort stable.
This means that if two or more equal objects are added, the order in
which the objects were added is kept. (user: js, size: 1689) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
48 49 50 51 52 53 54 | } - (of_list_object_t*)addObject: (id <OFComparing>)object { of_list_object_t *iter; for (iter = lastListObject; iter != NULL; iter = iter->previous) { | | | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | } - (of_list_object_t*)addObject: (id <OFComparing>)object { of_list_object_t *iter; for (iter = lastListObject; iter != NULL; iter = iter->previous) { if ([object compare: iter->object] != OF_ORDERED_ASCENDING) return [super insertObject: object afterListObject: iter]; } return [super prependObject: object]; } @end |