@@ -69,20 +69,20 @@ OF_NUMBER_TYPE_UINTMAX = 0x0D, OF_NUMBER_TYPE_SIGNED = 0x10, /*! `signed char` */ OF_NUMBER_TYPE_CHAR = OF_NUMBER_TYPE_UCHAR | OF_NUMBER_TYPE_SIGNED, - /*! `signed short` */ + /*! `short` */ OF_NUMBER_TYPE_SHORT = OF_NUMBER_TYPE_USHORT | OF_NUMBER_TYPE_SIGNED, - /*! `signed int` */ + /*! `int` */ OF_NUMBER_TYPE_INT = OF_NUMBER_TYPE_UINT | OF_NUMBER_TYPE_SIGNED, - /*! `signed long` */ + /*! `long` */ OF_NUMBER_TYPE_LONG = OF_NUMBER_TYPE_ULONG | OF_NUMBER_TYPE_SIGNED, - /*! `signed long long` */ + /*! `long long` */ OF_NUMBER_TYPE_LONGLONG = OF_NUMBER_TYPE_ULONGLONG | OF_NUMBER_TYPE_SIGNED, /*! `int8_t` */ OF_NUMBER_TYPE_INT8 = OF_NUMBER_TYPE_UINT8 | OF_NUMBER_TYPE_SIGNED, @@ -121,38 +121,38 @@ #endif @interface OFNumber: OFValue { union of_number_value { - bool bool_; - signed char sChar; - signed short sShort; - signed int sInt; - signed long sLong; - signed long long sLongLong; - unsigned char uChar; - unsigned short uShort; - unsigned int uInt; - unsigned long uLong; + bool bool_; + signed char sChar; + short sShort; + int sInt; + long sLong; + long long sLongLong; + unsigned char uChar; + unsigned short uShort; + unsigned int uInt; + unsigned long uLong; unsigned long long uLongLong; - int8_t int8; - int16_t int16; - int32_t int32; - int64_t int64; - uint8_t uInt8; - uint16_t uInt16; - uint32_t uInt32; - uint64_t uInt64; - size_t size; - ssize_t sSize; - intmax_t intMax; - uintmax_t uIntMax; - ptrdiff_t ptrDiff; - intptr_t intPtr; - uintptr_t uIntPtr; - float float_; - double double_; + int8_t int8; + int16_t int16; + int32_t int32; + int64_t int64; + uint8_t uInt8; + uint16_t uInt16; + uint32_t uInt32; + uint64_t uInt64; + size_t size; + ssize_t sSize; + intmax_t intMax; + uintmax_t uIntMax; + ptrdiff_t ptrDiff; + intptr_t intPtr; + uintptr_t uIntPtr; + float float_; + double double_; } _value; of_number_type_t _type; } /*! @@ -169,28 +169,28 @@ * @brief The OFNumber as a `signed char`. */ @property (readonly, nonatomic) signed char charValue; /*! - * @brief The OFNumber as a `signed short`. - */ -@property (readonly, nonatomic) signed short shortValue; - -/*! - * @brief The OFNumber as a `signed int`. - */ -@property (readonly, nonatomic) signed int intValue; - -/*! - * @brief The OFNumber as a `signed long`. - */ -@property (readonly, nonatomic) signed long longValue; - -/*! - * @brief The OFNumber as a `signed long long`. - */ -@property (readonly, nonatomic) signed long long longLongValue; + * @brief The OFNumber as a `short`. + */ +@property (readonly, nonatomic) short shortValue; + +/*! + * @brief The OFNumber as an `int`. + */ +@property (readonly, nonatomic) int intValue; + +/*! + * @brief The OFNumber as a `long`. + */ +@property (readonly, nonatomic) long longValue; + +/*! + * @brief The OFNumber as a `long long`. + */ +@property (readonly, nonatomic) long long longLongValue; /*! * @brief The OFNumber as an `unsigned char`. */ @property (readonly, nonatomic) unsigned char unsignedCharValue; @@ -331,40 +331,40 @@ * @return A new autoreleased OFNumber */ + (instancetype)numberWithChar: (signed char)sChar; /*! - * @brief Creates a new OFNumber with the specified `signed short`. - * - * @param sShort A `signed short` which the OFNumber should contain - * @return A new autoreleased OFNumber - */ -+ (instancetype)numberWithShort: (signed short)sShort; - -/*! - * @brief Creates a new OFNumber with the specified `signed int`. - * - * @param sInt A `signed int` which the OFNumber should contain - * @return A new autoreleased OFNumber - */ -+ (instancetype)numberWithInt: (signed int)sInt; - -/*! - * @brief Creates a new OFNumber with the specified `signed long`. - * - * @param sLong A `signed long` which the OFNumber should contain - * @return A new autoreleased OFNumber - */ -+ (instancetype)numberWithLong: (signed long)sLong; - -/*! - * @brief Creates a new OFNumber with the specified `signed long long`. - * - * @param sLongLong A `signed long long` which the OFNumber should contain - * @return A new autoreleased OFNumber - */ -+ (instancetype)numberWithLongLong: (signed long long)sLongLong; + * @brief Creates a new OFNumber with the specified `short`. + * + * @param sShort A `short` which the OFNumber should contain + * @return A new autoreleased OFNumber + */ ++ (instancetype)numberWithShort: (short)sShort; + +/*! + * @brief Creates a new OFNumber with the specified `int`. + * + * @param sInt An `int` which the OFNumber should contain + * @return A new autoreleased OFNumber + */ ++ (instancetype)numberWithInt: (int)sInt; + +/*! + * @brief Creates a new OFNumber with the specified `long`. + * + * @param sLong A `long` which the OFNumber should contain + * @return A new autoreleased OFNumber + */ ++ (instancetype)numberWithLong: (long)sLong; + +/*! + * @brief Creates a new OFNumber with the specified `long long`. + * + * @param sLongLong A `long long` which the OFNumber should contain + * @return A new autoreleased OFNumber + */ ++ (instancetype)numberWithLongLong: (long long)sLongLong; /*! * @brief Creates a new OFNumber with the specified `unsigned char`. * * @param uChar An `unsigned char` which the OFNumber should contain @@ -568,44 +568,41 @@ * @return An initialized OFNumber */ - (instancetype)initWithChar: (signed char)sChar; /*! - * @brief Initializes an already allocated OFNumber with the specified - * `signed short`. - * - * @param sShort A `signed short` which the OFNumber should contain - * @return An initialized OFNumber - */ -- (instancetype)initWithShort: (signed short)sShort; - -/*! - * @brief Initializes an already allocated OFNumber with the specified - * `signed int`. - * - * @param sInt A `signed int` which the OFNumber should contain - * @return An initialized OFNumber - */ -- (instancetype)initWithInt: (signed int)sInt; - -/*! - * @brief Initializes an already allocated OFNumber with the specified - * `signed long`. - * - * @param sLong A `signed long` which the OFNumber should contain - * @return An initialized OFNumber - */ -- (instancetype)initWithLong: (signed long)sLong; - -/*! - * @brief Initializes an already allocated OFNumber with the specified - * `signed long long`. - * - * @param sLongLong A `signed long long` which the OFNumber should contain - * @return An initialized OFNumber - */ -- (instancetype)initWithLongLong: (signed long long)sLongLong; + * @brief Initializes an already allocated OFNumber with the specified `short`. + * + * @param sShort A `short` which the OFNumber should contain + * @return An initialized OFNumber + */ +- (instancetype)initWithShort: (short)sShort; + +/*! + * @brief Initializes an already allocated OFNumber with the specified `int`. + * + * @param sInt An `int` which the OFNumber should contain + * @return An initialized OFNumber + */ +- (instancetype)initWithInt: (int)sInt; + +/*! + * @brief Initializes an already allocated OFNumber with the specified `long`. + * + * @param sLong A `long` which the OFNumber should contain + * @return An initialized OFNumber + */ +- (instancetype)initWithLong: (long)sLong; + +/*! + * @brief Initializes an already allocated OFNumber with the specified + * `long long`. + * + * @param sLongLong A `long long` which the OFNumber should contain + * @return An initialized OFNumber + */ +- (instancetype)initWithLongLong: (long long)sLongLong; /*! * @brief Initializes an already allocated OFNumber with the specified * `unsigned char`. *