Index: src/OFArray.h ================================================================== --- src/OFArray.h +++ src/OFArray.h @@ -434,19 +434,10 @@ * @return A new array with the objects from the specified array added */ - (OFArray OF_GENERIC(ObjectType) *)arrayByAddingObjectsFromArray: (OFArray OF_GENERIC(ObjectType) *)array; -/** - * @brief Creates a new array with all occurrences of the specified object - * removed. - * - * @param object The object to remove - * @return A new array with all occurrences of the specified object removed - */ -- (OFArray OF_GENERIC(ObjectType) *)arrayByRemovingObject: (ObjectType)object; - #ifdef OF_HAVE_BLOCKS /** * @brief Executes a block for each object. * * @param block The block to execute for each object Index: src/OFArray.m ================================================================== --- src/OFArray.m +++ src/OFArray.m @@ -813,18 +813,10 @@ [ret makeImmutable]; return ret; } -- (OFArray *)arrayByRemovingObject: (id)object -{ - OFMutableArray *ret = [[self mutableCopy] autorelease]; - [ret removeObject: object]; - [ret makeImmutable]; - return ret; -} - #ifdef OF_HAVE_BLOCKS - (OFArray *)mappedArrayUsingBlock: (OFArrayMapBlock)block { OFArray *ret; size_t count = self.count; Index: src/OFLocale.h ================================================================== --- src/OFLocale.h +++ src/OFLocale.h @@ -150,11 +150,11 @@ * * @warning This sets the locale via `setlocale()`! * * @warning You should never call this yourself, except if you do not use * @ref OFApplication. In this case, you need to allocate exactly one - * instance of OFLocale, which will be come the current locale, and + * instance of OFLocale, which will become the current locale, and * call this method. */ - (instancetype)init; #ifdef OF_HAVE_FILES Index: src/OFSet.h ================================================================== --- src/OFSet.h +++ src/OFSet.h @@ -140,20 +140,10 @@ * @param firstObject The first object for the set * @return An initialized set with the specified objects */ - (instancetype)initWithObjects: (ObjectType)firstObject, ... OF_SENTINEL; -/** - * @brief Initializes an already allocated set with the specified objects. - * - * @param objects An array of objects for the set - * @param count The number of objects in the specified array - * @return An initialized set with the specified objects - */ -- (instancetype)initWithObjects: (ObjectType const _Nonnull *_Nonnull)objects - count: (size_t)count; - /** * @brief Initializes an already allocated set with the specified object and * va_list. * * @param firstObject The first object for the set @@ -161,10 +151,20 @@ * @return An initialized set with the specified object and va_list */ - (instancetype)initWithObject: (ObjectType)firstObject arguments: (va_list)arguments; +/** + * @brief Initializes an already allocated set with the specified objects. + * + * @param objects An array of objects for the set + * @param count The number of objects in the specified array + * @return An initialized set with the specified objects + */ +- (instancetype)initWithObjects: (ObjectType const _Nonnull *_Nonnull)objects + count: (size_t)count; + /** * @brief Returns an OFEnumerator to enumerate through all objects of the set. * * @return An OFEnumerator to enumerate through all objects of the set */ @@ -184,35 +184,17 @@ * @return Whether the receiver and the specified set have at least one object * in common */ - (bool)intersectsSet: (OFSet OF_GENERIC(ObjectType) *)set; -/** - * @brief Creates a new set which contains the objects which are in the - * receiver, but not in the specified set. - * - * @param set The set whose objects will not be in the new set - */ -- (OFSet OF_GENERIC(ObjectType) *)setBySubtractingSet: - (OFSet OF_GENERIC(ObjectType) *)set; - -/** - * @brief Creates a new set by creating the intersection of the receiver and - * the specified set. - * - * @param set The set to intersect with - */ -- (OFSet OF_GENERIC(ObjectType) *)setByIntersectingWithSet: - (OFSet OF_GENERIC(ObjectType) *)set; - /** * @brief Creates a new set by creating the union of the receiver and the * specified set. * * @param set The set to create the union with */ -- (OFSet OF_GENERIC(ObjectType) *)setByAddingSet: +- (OFSet OF_GENERIC(ObjectType) *)setByAddingObjectsFromSet: (OFSet OF_GENERIC(ObjectType) *)set; /** * @brief Checks whether the set contains an object equal to the specified * object. Index: src/OFSet.m ================================================================== --- src/OFSet.m +++ src/OFSet.m @@ -385,27 +385,11 @@ objc_autoreleasePoolPop(pool); return [element autorelease]; } -- (OFSet *)setBySubtractingSet: (OFSet *)set -{ - OFMutableSet *new = [[self mutableCopy] autorelease]; - [new minusSet: set]; - [new makeImmutable]; - return new; -} - -- (OFSet *)setByIntersectingWithSet: (OFSet *)set -{ - OFMutableSet *new = [[self mutableCopy] autorelease]; - [new intersectSet: set]; - [new makeImmutable]; - return new; -} - -- (OFSet *)setByAddingSet: (OFSet *)set +- (OFSet *)setByAddingObjectsFromSet: (OFSet *)set { OFMutableSet *new = [[self mutableCopy] autorelease]; [new unionSet: set]; [new makeImmutable]; return new;