@@ -42,19 +42,15 @@ /*! * @class OFList OFList.h ObjFW/OFList.h * * @brief A class which provides easy to use double-linked lists. */ -#ifdef OF_HAVE_GENERICS -@interface OFList: -#else -# ifndef DOXYGEN -# define ObjectType id -# endif -@interface OFList: +@interface OFList OF_GENERIC(ObjectType): OFObject +#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) +# define ObjectType id #endif - OFObject { of_list_object_t *_firstListObject; of_list_object_t *_lastListObject; size_t _count; unsigned long _mutations; @@ -179,14 +175,14 @@ /*! * @brief Removes all objects from the list. */ - (void)removeAllObjects; -@end #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef ObjectType #endif +@end @interface OFListEnumerator: OFEnumerator { OFList *_list; of_list_object_t *_current;