@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2022 Jonathan Schleifer + * Copyright (c) 2008-2024 Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -15,24 +15,16 @@ #import "OFData.h" OF_ASSUME_NONNULL_BEGIN -@class OFString; -@class OFURI; - /** * @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! * @@ -52,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 @@ -87,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. *