Index: src/OFNumber.h ================================================================== --- src/OFNumber.h +++ src/OFNumber.h @@ -159,15 +159,10 @@ /*! * @brief The OFNumber as a `size_t`. */ @property (readonly, nonatomic) size_t sizeValue; -/*! - * @brief The OFNumber as an `ssize_t`. - */ -@property (readonly, nonatomic) ssize_t sSizeValue; - /*! * @brief The OFNumber as a `ptrdiff_t`. */ @property (readonly, nonatomic) ptrdiff_t ptrDiffValue; @@ -365,18 +360,10 @@ * @param value The `size_t` value which the OFNumber should contain * @return A new autoreleased OFNumber */ + (instancetype)numberWithSize: (size_t)value; -/*! - * @brief Creates a new OFNumber with the specified `ssize_t`. - * - * @param value The `ssize_t` value which the OFNumber should contain - * @return A new autoreleased OFNumber - */ -+ (instancetype)numberWithSSize: (ssize_t)value; - /*! * @brief Creates a new OFNumber with the specified `ptrdiff_t`. * * @param value The `ptrdiff_t` value which the OFNumber should contain * @return A new autoreleased OFNumber @@ -599,19 +586,10 @@ * @param value The `size_t` value which the OFNumber should contain * @return An initialized OFNumber */ - (instancetype)initWithSize: (size_t)value; -/*! - * @brief Initializes an already allocated OFNumber with the specified - * `ssize_t`. - * - * @param value The `ssize_t` value which the OFNumber should contain - * @return An initialized OFNumber - */ -- (instancetype)initWithSSize: (ssize_t)value; - /*! * @brief Initializes an already allocated OFNumber with the specified * `ptrdiff_t`. * * @param value The `ptrdiff_t` value which the OFNumber should contain Index: src/OFNumber.m ================================================================== --- src/OFNumber.m +++ src/OFNumber.m @@ -270,20 +270,10 @@ return [self initWithUnsignedLong: (unsigned long)value]; return (id)[[OFNumber of_alloc] initWithSize: value]; } -- (instancetype)initWithSSize: (ssize_t)value -{ - if (value >= 0) - return [self initWithSize: value]; - if (value <= LONG_MIN) - return [self initWithLong: (long)value]; - - return (id)[[OFNumber of_alloc] initWithSSize: value]; -} - #ifdef __clang__ /* * This warning should probably not exist at all, as it prevents checking * whether one type fits into another in a portable way. */ @@ -491,15 +481,10 @@ + (instancetype)numberWithSize: (size_t)value { return [[[self alloc] initWithSize: value] autorelease]; } -+ (instancetype)numberWithSSize: (ssize_t)value -{ - return [[[self alloc] initWithSSize: value] autorelease]; -} - + (instancetype)numberWithPtrDiff: (ptrdiff_t)value { return [[[self alloc] initWithPtrDiff: value] autorelease]; } @@ -743,21 +728,10 @@ _value.unsigned_ = value; _type = OF_NUMBER_TYPE_UNSIGNED; _typeEncoding = @encode(size_t); - return self; -} - -- (instancetype)initWithSSize: (ssize_t)value -{ - self = [super init]; - - _value.signed_ = value; - _type = OF_NUMBER_TYPE_SIGNED; - _typeEncoding = @encode(ssize_t); - return self; } - (instancetype)initWithPtrDiff: (ptrdiff_t)value { @@ -1009,15 +983,10 @@ - (size_t)sizeValue { RETURN_AS(size_t) } -- (ssize_t)sSizeValue -{ - RETURN_AS(ssize_t) -} - - (ptrdiff_t)ptrDiffValue { RETURN_AS(ptrdiff_t) }