Index: src/OFMutableArray.h ================================================================== --- src/OFMutableArray.h +++ src/OFMutableArray.h @@ -126,17 +126,17 @@ */ - (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block; #endif /** - * \brief Swaps the objects at the specified indices. + * \brief Exchange the objects at the specified indices. * - * \param index1 The index of the first object to swap - * \param index2 The index of the second object to swap + * \param index1 The index of the first object to exchange + * \param index2 The index of the second object to exchange */ -- (void)swapObjectAtIndex: (size_t)index1 - withObjectAtIndex: (size_t)index2; +- (void)exchangeObjectAtIndex: (size_t)index1 + withObjectAtIndex: (size_t)index2; /** * \brief Sorts the array. */ - (void)sort; Index: src/OFMutableArray.m ================================================================== --- src/OFMutableArray.m +++ src/OFMutableArray.m @@ -57,17 +57,17 @@ while ([[array objectAtIndex: j] compare: pivot] != OF_ORDERED_ASCENDING && j > left) j--; if (i < j) - [array swapObjectAtIndex: i - withObjectAtIndex: j]; + [array exchangeObjectAtIndex: i + withObjectAtIndex: j]; } while (i < j); if ([[array objectAtIndex: i] compare: pivot] == OF_ORDERED_DESCENDING) - [array swapObjectAtIndex: i - withObjectAtIndex: right]; + [array exchangeObjectAtIndex: i + withObjectAtIndex: right]; if (i > 0) quicksort(array, left, i - 1); quicksort(array, i + 1, right); } @@ -297,12 +297,12 @@ withObject: block(object, index, stop)]; }]; } #endif -- (void)swapObjectAtIndex: (size_t)index1 - withObjectAtIndex: (size_t)index2 +- (void)exchangeObjectAtIndex: (size_t)index1 + withObjectAtIndex: (size_t)index2 { id object1 = [self objectAtIndex: index1]; id object2 = [self objectAtIndex: index2]; [object1 retain]; @@ -332,13 +332,13 @@ if (count == 0 || count == 1) return; for (i = 0, j = count - 1; i < j; i++, j--) - [self swapObjectAtIndex: i - withObjectAtIndex: j]; + [self exchangeObjectAtIndex: i + withObjectAtIndex: j]; } - (void)makeImmutable { } @end Index: src/OFMutableArray_adjacent.m ================================================================== --- src/OFMutableArray_adjacent.m +++ src/OFMutableArray_adjacent.m @@ -210,12 +210,12 @@ [object release]; mutations++; } -- (void)swapObjectAtIndex: (size_t)index1 - withObjectAtIndex: (size_t)index2 +- (void)exchangeObjectAtIndex: (size_t)index1 + withObjectAtIndex: (size_t)index2 { id *objects = [array cArray]; size_t count = [array count]; id tmp;