@@ -44,15 +44,15 @@ return comparator(left, selector, right); } static void quicksort(OFMutableArray *array, size_t left, size_t right, SEL selector, - int options) + OFArraySortOptions options) { OFComparisonResult ascending, descending; - if (options & OF_ARRAY_SORT_DESCENDING) { + if (options & OFArraySortDescending) { ascending = OFOrderedDescending; descending = OFOrderedAscending; } else { ascending = OFOrderedAscending; descending = OFOrderedDescending; @@ -90,15 +90,15 @@ } #ifdef OF_HAVE_BLOCKS static void quicksortWithBlock(OFMutableArray *array, size_t left, size_t right, - OFComparator comparator, int options) + OFComparator comparator, OFArraySortOptions options) { OFComparisonResult ascending, descending; - if (options & OF_ARRAY_SORT_DESCENDING) { + if (options & OFArraySortDescending) { ascending = OFOrderedDescending; descending = OFOrderedAscending; } else { ascending = OFOrderedAscending; descending = OFOrderedDescending; @@ -382,11 +382,11 @@ { [self removeObjectsInRange: OFMakeRange(0, self.count)]; } #ifdef OF_HAVE_BLOCKS -- (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block +- (void)replaceObjectsUsingBlock: (OFArrayReplaceBlock)block { [self enumerateObjectsUsingBlock: ^ (id object, size_t idx, bool *stop) { id new = block(object, idx); @@ -414,11 +414,11 @@ { [self sortUsingSelector: @selector(compare:) options: 0]; } - (void)sortUsingSelector: (SEL)selector - options: (int)options + options: (OFArraySortOptions)options { size_t count = self.count; if (count == 0 || count == 1) return; @@ -425,11 +425,12 @@ quicksort(self, 0, count - 1, selector, options); } #ifdef OF_HAVE_BLOCKS -- (void)sortUsingComparator: (OFComparator)comparator options: (int)options +- (void)sortUsingComparator: (OFComparator)comparator + options: (OFArraySortOptions)options { size_t count = self.count; if (count == 0 || count == 1) return;