@@ -37,17 +37,14 @@ * @class OFCountedSet OFCountedSet.h ObjFW/OFCountedSet.h * * @brief An abstract class for a mutable unordered set of objects, counting how * often it contains an object. */ -#ifdef OF_HAVE_GENERICS -@interface OFCountedSet: OFMutableSet -#else -# ifndef DOXYGEN -# define ObjectType id -# endif -@interface OFCountedSet: OFMutableSet +@interface OFCountedSet OF_GENERIC(ObjectType): + OFMutableSet OF_GENERIC(ObjectType) +#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) +# define ObjectType id #endif /*! * @brief Returns how often the object is in the set. * * @return How often the object is in the set @@ -61,11 +58,11 @@ * @param block The block to execute for each object in the set */ - (void)enumerateObjectsAndCountUsingBlock: (of_counted_set_enumeration_block_t)block; #endif -@end #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef ObjectType #endif +@end OF_ASSUME_NONNULL_END