@@ -35,17 +35,13 @@ * @class OFMutableArray OFArray.h ObjFW/OFArray.h * * @brief An abstract class for storing, adding and removing objects in an * array. */ -#ifdef OF_HAVE_GENERICS -@interface OFMutableArray: OFArray -#else -# ifndef DOXYGEN -# define ObjectType id -# endif -@interface OFMutableArray: OFArray +@interface OFMutableArray OF_GENERIC(ObjectType): OFArray OF_GENERIC(ObjectType) +#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) +# define ObjectType id #endif /*! * @brief Creates a new OFMutableArray with enough memory to hold the specified * number of objects. * @@ -206,11 +202,11 @@ /*! * @brief Converts the mutable array to an immutable array. */ - (void)makeImmutable; -@end #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef ObjectType #endif +@end OF_ASSUME_NONNULL_END