@@ -258,17 +258,17 @@ } - (void)addObject: (id)object { [self insertObject: object - atIndex: [self count]]; + atIndex: self.count]; } - (void)addObjectsFromArray: (OFArray *)array { [self insertObjectsFromArray: array - atIndex: [self count]]; + atIndex: self.count]; } - (void)insertObject: (id)object atIndex: (size_t)idx { @@ -304,11 +304,11 @@ size_t count; if (oldObject == nil || newObject == nil) @throw [OFInvalidArgumentException exception]; - count = [self count]; + count = self.count; for (size_t i = 0; i < count; i++) { if ([[self objectAtIndex: i] isEqual: oldObject]) { [self replaceObjectAtIndex: i withObject: newObject]; @@ -323,11 +323,11 @@ size_t count; if (oldObject == nil || newObject == nil) @throw [OFInvalidArgumentException exception]; - count = [self count]; + count = self.count; for (size_t i = 0; i < count; i++) { if ([self objectAtIndex: i] == oldObject) { [self replaceObjectAtIndex: i withObject: newObject]; @@ -347,11 +347,11 @@ size_t count; if (object == nil) @throw [OFInvalidArgumentException exception]; - count = [self count]; + count = self.count; for (size_t i = 0; i < count; i++) { if ([[self objectAtIndex: i] isEqual: object]) { [self removeObjectAtIndex: i]; @@ -365,11 +365,11 @@ size_t count; if (object == nil) @throw [OFInvalidArgumentException exception]; - count = [self count]; + count = self.count; for (size_t i = 0; i < count; i++) { if ([self objectAtIndex: i] == object) { [self removeObjectAtIndex: i]; @@ -384,21 +384,21 @@ [self removeObjectAtIndex: range.location]; } - (void)removeLastObject { - size_t count = [self count]; + size_t count = self.count; if (count == 0) return; [self removeObjectAtIndex: count - 1]; } - (void)removeAllObjects { - [self removeObjectsInRange: of_range(0, [self count])]; + [self removeObjectsInRange: of_range(0, self.count)]; } #ifdef OF_HAVE_BLOCKS - (void)replaceObjectsUsingBlock: (of_array_replace_block_t)block { @@ -437,11 +437,11 @@ } - (void)sortUsingSelector: (SEL)selector options: (int)options { - size_t count = [self count]; + size_t count = self.count; if (count == 0 || count == 1) return; quicksort(self, 0, count - 1, selector, options); @@ -449,11 +449,11 @@ #ifdef OF_HAVE_BLOCKS - (void)sortUsingComparator: (of_comparator_t)comparator options: (int)options { - size_t count = [self count]; + size_t count = self.count; if (count == 0 || count == 1) return; quicksortWithBlock(self, 0, count - 1, comparator, options); @@ -460,11 +460,11 @@ } #endif - (void)reverse { - size_t i, j, count = [self count]; + size_t i, j, count = self.count; if (count == 0 || count == 1) return; for (i = 0, j = count - 1; i < j; i++, j--)