@@ -85,11 +85,11 @@ * @class OFArray OFArray.h ObjFW/OFArray.h * * @brief An abstract class for storing objects in an array. */ #ifdef OF_HAVE_GENERICS -@interface OFArray : +@interface OFArray: #else # ifndef DOXYGEN # define ObjectType id # endif @interface OFArray: @@ -123,11 +123,11 @@ * @brief Creates a new OFArray with the objects from the specified array. * * @param array An array * @return A new autoreleased OFArray */ -+ (instancetype)arrayWithArray: (OFArray OF_GENERIC(ObjectType)*)array; ++ (instancetype)arrayWithArray: (OFArray OF_GENERIC(ObjectType) *)array; /*! * @brief Creates a new OFArray with the objects from the specified C array of * the specified length. * @@ -169,11 +169,11 @@ * @brief Initializes an OFArray with the objects from the specified array. * * @param array An array * @return An initialized OFArray */ -- initWithArray: (OFArray OF_GENERIC(ObjectType)*)array; +- initWithArray: (OFArray OF_GENERIC(ObjectType) *)array; /*! * @brief Initializes an OFArray with the objects from the specified C array of * the specified length. * @@ -207,11 +207,11 @@ * @note Any nil values are replaced with @ref OFNull! * * @param key The key of the value to return * @return The value for the specified key */ -- (nullable id)valueForKey: (OFString*)key; +- (nullable id)valueForKey: (OFString *)key; /*! * @brief Set the value for the specified key * * If the key starts with an `@`, the `@` is stripped and @@ -223,11 +223,11 @@ * * @param value The value for the specified key * @param key The key of the value to set */ - (void)setValue: (nullable id)value - forKey: (OFString*)key; + forKey: (OFString *)key; /*! * @brief Copies the objects at the specified range to the specified buffer. * * @param buffer The buffer to copy the objects to @@ -306,19 +306,19 @@ * @brief Returns the objects in the specified range as a new OFArray. * * @param range The range for the subarray * @return The subarray as a new autoreleased OFArray */ -- (OFArray OF_GENERIC(ObjectType)*)objectsInRange: (of_range_t)range; +- (OFArray OF_GENERIC(ObjectType) *)objectsInRange: (of_range_t)range; /*! * @brief Creates a string by joining all objects of the array. * * @param separator The string with which the objects should be joined * @return A string containing all objects joined by the separator */ -- (OFString*)componentsJoinedByString: (OFString*)separator; +- (OFString *)componentsJoinedByString: (OFString *)separator; /*! * @brief Creates a string by joining all objects of the array. * * @param separator The string with which the objects should be joined @@ -327,23 +327,23 @@ * Value | Description * ----------------------|---------------------- * `OF_ARRAY_SKIP_EMPTY` | Skip empty components * @return A string containing all objects joined by the separator */ -- (OFString*)componentsJoinedByString: (OFString*)separator - options: (int)options; +- (OFString *)componentsJoinedByString: (OFString *)separator + options: (int)options; /*! * @brief Creates a string by calling the selector on all objects of the array * and joining the strings returned by calling the selector. * * @param separator The string with which the objects should be joined * @param selector The selector to perform on the objects * @return A string containing all objects joined by the separator */ -- (OFString*)componentsJoinedByString: (OFString*)separator - usingSelector: (SEL)selector; +- (OFString *)componentsJoinedByString: (OFString *)separator + usingSelector: (SEL)selector; /*! * @brief Creates a string by calling the selector on all objects of the array * and joining the strings returned by calling the selector. * @@ -354,13 +354,13 @@ * Value | Description * ----------------------|---------------------- * `OF_ARRAY_SKIP_EMPTY` | Skip empty components * @return A string containing all objects joined by the separator */ -- (OFString*)componentsJoinedByString: (OFString*)separator - usingSelector: (SEL)selector - options: (int)options; +- (OFString *)componentsJoinedByString: (OFString *)separator + usingSelector: (SEL)selector + options: (int)options; /*! * @brief Performs the specified selector on all objects in the array. * * @param selector The selector to perform on all objects in the array @@ -381,11 +381,11 @@ /*! * @brief Returns a sorted copy of the array. * * @return A sorted copy of the array */ -- (OFArray OF_GENERIC(ObjectType)*)sortedArray; +- (OFArray OF_GENERIC(ObjectType) *)sortedArray; /*! * @brief Returns a sorted copy of the array. * * @param options The options to use when sorting the array.@n @@ -393,51 +393,51 @@ * Value | Description * ---------------------------|------------------------- * `OF_ARRAY_SORT_DESCENDING` | Sort in descending order * @return A sorted copy of the array */ -- (OFArray OF_GENERIC(ObjectType)*)sortedArrayWithOptions: (int)options; +- (OFArray OF_GENERIC(ObjectType) *)sortedArrayWithOptions: (int)options; /*! * @brief Returns a copy of the array with the order reversed. * * @return A copy of the array with the order reversed */ -- (OFArray OF_GENERIC(ObjectType)*)reversedArray; +- (OFArray OF_GENERIC(ObjectType) *)reversedArray; /*! * @brief Creates a new array with the specified object added. * * @param object The object to add * @return A new array with the specified object added */ -- (OFArray OF_GENERIC(ObjectType)*)arrayByAddingObject: (ObjectType)object; +- (OFArray OF_GENERIC(ObjectType) *)arrayByAddingObject: (ObjectType)object; /*! * @brief Creates a new array with the objects from the specified array added. * * @param array The array with objects to add * @return A new array with the objects from the specified array added */ -- (OFArray OF_GENERIC(ObjectType)*)arrayByAddingObjectsFromArray: - (OFArray OF_GENERIC(ObjectType)*)array; +- (OFArray OF_GENERIC(ObjectType) *)arrayByAddingObjectsFromArray: + (OFArray OF_GENERIC(ObjectType) *)array; /*! * @brief Creates a new array with the specified object removed. * * @param object The object to remove * @return A new array with the specified object removed */ -- (OFArray OF_GENERIC(ObjectType)*)arrayByRemovingObject: (ObjectType)object; +- (OFArray OF_GENERIC(ObjectType) *)arrayByRemovingObject: (ObjectType)object; /*! * @brief Returns an OFEnumerator to enumerate through all objects of the * array. * * @returns An OFEnumerator to enumerate through all objects of the array */ -- (OFEnumerator OF_GENERIC(ObjectType)*)objectEnumerator; +- (OFEnumerator OF_GENERIC(ObjectType) *)objectEnumerator; #ifdef OF_HAVE_BLOCKS /*! * @brief Executes a block for each object. * @@ -449,21 +449,21 @@ * @brief Creates a new array, mapping each object using the specified block. * * @param block A block which maps an object for each object * @return A new, autoreleased OFArray */ -- (OFArray*)mappedArrayUsingBlock: (of_array_map_block_t)block; +- (OFArray *)mappedArrayUsingBlock: (of_array_map_block_t)block; /*! * @brief Creates a new array, only containing the objects for which the block * returns true. * * @param block A block which determines if the object should be in the new * array * @return A new, autoreleased OFArray */ -- (OFArray OF_GENERIC(ObjectType)*)filteredArrayUsingBlock: +- (OFArray OF_GENERIC(ObjectType) *)filteredArrayUsingBlock: (of_array_filter_block_t)block; /*! * @brief Folds the array to a single object using the specified block. * @@ -494,11 +494,11 @@ unsigned long _mutations; unsigned long *_mutationsPtr; size_t _position; } -- initWithArray: (OFArray*)data +- initWithArray: (OFArray *)data mutationsPtr: (unsigned long *_Nullable)mutationsPtr; @end OF_ASSUME_NONNULL_END