@@ -84,20 +84,16 @@ /*! * @class OFArray OFArray.h ObjFW/OFArray.h * * @brief An abstract class for storing objects in an array. */ -#ifdef OF_HAVE_GENERICS -@interface OFArray: -#else -# ifndef DOXYGEN -# define ObjectType id -# endif -@interface OFArray: +@interface OFArray OF_GENERIC(ObjectType): OFObject +#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) +# define ObjectType id #endif - OFObject /*! * @brief Creates a new OFArray. * * @return A new autoreleased OFArray */ @@ -480,14 +476,14 @@ * all objects except the first * @return The array folded to a single object */ - (nullable id)foldUsingBlock: (of_array_fold_block_t)block; #endif -@end #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef ObjectType #endif +@end @interface OFArrayEnumerator: OFEnumerator { OFArray *_array; size_t _count;