@@ -52,11 +52,11 @@ /** @file */ /** * @brief A result of a comparison. */ -typedef enum OFComparisonResult { +typedef enum { /** The left object is smaller than the right */ OFOrderedAscending = -1, /** Both objects are equal */ OFOrderedSame = 0, /** The left object is bigger than the right */ @@ -73,13 +73,13 @@ */ typedef OFComparisonResult (^OFComparator)(id _Nonnull left, id _Nonnull right); #endif /** - * @brief An enum for storing endianess. + * @brief An enum for representing endianess. */ -typedef enum OFByteOrder { +typedef enum { /** Most significant byte first (big endian) */ OFByteOrderBigEndian, /** Least significant byte first (little endian) */ OFByteOrderLittleEndian, /** Native byte order of the system */ @@ -93,17 +93,16 @@ /** * @struct OFRange OFObject.h ObjFW/OFObject.h * * @brief A range. */ -struct OF_BOXABLE OFRange { +typedef struct OF_BOXABLE { /** The start of the range */ size_t location; /** The length of the range */ size_t length; -}; -typedef struct OFRange OFRange; +} OFRange; /** * @brief Creates a new OFRange. * * @param start The starting index of the range @@ -145,17 +144,16 @@ /** * @struct OFPoint OFObject.h ObjFW/OFObject.h * * @brief A point. */ -struct OF_BOXABLE OFPoint { +typedef struct OF_BOXABLE { /** The x coordinate of the point */ float x; /** The y coordinate of the point */ float y; -}; -typedef struct OFPoint OFPoint; +} OFPoint; /** * @brief Creates a new OFPoint. * * @param x The x coordinate of the point @@ -192,17 +190,16 @@ /** * @struct OFSize OFObject.h ObjFW/OFObject.h * * @brief A size. */ -struct OF_BOXABLE OFSize { +typedef struct OF_BOXABLE { /** The width of the size */ float width; /** The height of the size */ float height; -}; -typedef struct OFSize OFSize; +} OFSize; /** * @brief Creates a new OFSize. * * @param width The width of the size @@ -239,17 +236,16 @@ /** * @struct OFRect OFObject.h ObjFW/OFObject.h * * @brief A rectangle. */ -struct OF_BOXABLE OFRect { +typedef struct OF_BOXABLE { /** The point from where the rectangle originates */ OFPoint origin; /** The size of the rectangle */ OFSize size; -}; -typedef struct OFRect OFRect; +} OFRect; /** * @brief Creates a new OFRect. * * @param x The x coordinate of the top left corner of the rectangle