@@ -135,22 +135,22 @@ * @param string The string with the Base64-encoded data * @return A new autoreleased OFData */ + (instancetype)dataWithBase64EncodedString: (OFString *)string; -- init OF_UNAVAILABLE; +- (instancetype)init OF_UNAVAILABLE; /*! * @brief Initialized an already allocated OFData with the specified `count` * items of size 1. * * @param items The items to store in the OFData * @param count The number of items * @return An initialized OFData */ -- initWithItems: (const void *)items - count: (size_t)count; +- (instancetype)initWithItems: (const void *)items + count: (size_t)count; /*! * @brief Initialized an already allocated OFData with the specified `count` * items of the specified size. * @@ -157,13 +157,13 @@ * @param items The items to store in the OFData * @param itemSize The item size of a single item in bytes * @param count The number of items * @return An initialized OFData */ -- initWithItems: (const void *)items - itemSize: (size_t)itemSize - count: (size_t)count; +- (instancetype)initWithItems: (const void *)items + itemSize: (size_t)itemSize + count: (size_t)count; /*! * @brief Initializes an already allocated OFData with the specified `count` * items of size 1 by taking over ownership of the specified items * pointer. @@ -172,13 +172,13 @@ * @param count The number of items * @param freeWhenDone Whether to free the pointer when it is no longer needed * by the OFData * @return An initialized OFData */ -- initWithItemsNoCopy: (const void *)items - count: (size_t)count - freeWhenDone: (bool)freeWhenDone; +- (instancetype)initWithItemsNoCopy: (const void *)items + count: (size_t)count + freeWhenDone: (bool)freeWhenDone; /*! * @brief Initializes an already allocated OFData with the specified `count` * items of the specified size by taking ownership of the specified * items pointer. @@ -188,24 +188,24 @@ * @param count The number of items * @param freeWhenDone Whether to free the pointer when it is no longer needed * by the OFData * @return An initialized OFData */ -- initWithItemsNoCopy: (const void *)items - itemSize: (size_t)itemSize - count: (size_t)count - freeWhenDone: (bool)freeWhenDone; +- (instancetype)initWithItemsNoCopy: (const void *)items + itemSize: (size_t)itemSize + count: (size_t)count + freeWhenDone: (bool)freeWhenDone; #ifdef OF_HAVE_FILES /*! * @brief Initializes an already allocated OFData with an item size of 1, * containing the data of the specified file. * * @param path The path of the file * @return An initialized OFData */ -- initWithContentsOfFile: (OFString *)path; +- (instancetype)initWithContentsOfFile: (OFString *)path; #endif #if defined(OF_HAVE_FILES) || defined(OF_HAVE_SOCKETS) /*! * @brief Initializes an already allocated OFData with an item size of 1, @@ -212,30 +212,30 @@ * containing the data of the specified URL. * * @param URL The URL to the contents for the OFData * @return A new autoreleased OFData */ -- initWithContentsOfURL: (OFURL *)URL; +- (instancetype)initWithContentsOfURL: (OFURL *)URL; #endif /*! * @brief Initializes an already allocated OFData with an item size of 1, * containing the data of the string representation. * * @param string The string representation of the data * @return A new autoreleased OFData */ -- initWithStringRepresentation: (OFString *)string; +- (instancetype)initWithStringRepresentation: (OFString *)string; /*! * @brief Initializes an already allocated OFData with an item size of 1, * containing the data of the Base64-encoded string. * * @param string The string with the Base64-encoded data * @return An initialized OFData */ -- initWithBase64EncodedString: (OFString *)string; +- (instancetype)initWithBase64EncodedString: (OFString *)string; /*! * @brief Returns the number of items in the OFData. * * @return The number of items in the OFData