@@ -15,23 +15,16 @@ #import "OFData.h" OF_ASSUME_NONNULL_BEGIN -@class OFString; - /** * @class OFMutableData OFMutableData.h ObjFW/OFMutableData.h * * @brief A class for storing and manipulating arbitrary data in an array. */ @interface OFMutableData: OFData -{ - size_t _capacity; - OF_RESERVE_IVARS(OFMutableData, 4) -} - /** * @brief All items of the OFMutableData as a C array. * * @warning The pointer is only valid until the OFMutableData is changed! * @@ -51,26 +44,10 @@ * @brief The last item of the OFMutableData or `NULL`. */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) void *mutableLastItem OF_RETURNS_INNER_POINTER; -/** - * @brief Creates a new OFMutableData with an item size of 1. - * - * @return A new autoreleased OFMutableData - */ -+ (instancetype)data; - -/** - * @brief Creates a new OFMutableData whose items all have the same specified - * size. - * - * @param itemSize The size of a single element in the OFMutableData - * @return A new autoreleased OFMutableData - */ -+ (instancetype)dataWithItemSize: (size_t)itemSize; - /** * @brief Creates a new OFMutableData with enough memory to hold the specified * number of items which all have an item size of 1. * * @param capacity The initial capacity for the OFMutableData @@ -86,26 +63,10 @@ * @param capacity The initial capacity for the OFMutableData * @return A new autoreleased OFMutableData */ + (instancetype)dataWithItemSize: (size_t)itemSize capacity: (size_t)capacity; -/** - * @brief Initializes an already allocated OFMutableData with an item size of 1. - * - * @return An initialized OFMutableData - */ -- (instancetype)init; - -/** - * @brief Initializes an already allocated OFMutableData whose items all have - * the same size. - * - * @param itemSize The size of a single element in the OFMutableData - * @return An initialized OFMutableData - */ -- (instancetype)initWithItemSize: (size_t)itemSize; - /** * @brief Initializes an already allocated OFMutableData with enough memory to * hold the the specified number of items which all have an item size of * 1. *