summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Schleifer <js@heap.zone>2018-02-16 23:25:08 +0100
committerJonathan Schleifer <js@heap.zone>2018-02-16 23:25:08 +0100
commit6a221ce30f2c64869602b7e7170c6198f3c0a343 (patch)
treefd06448f1ac0d0978b96b81b3cd6120bdb8a9fb8
parentd6e229595396b39eb2ac7fa28d42868e777f8158 (diff)
Remove OF_UNAVAILABLE from two -[init] methods
These were unavailable in the immutable class, but available in the mutable subclass. However, Clang 3.4 does not support this.
-rw-r--r--src/OFData+Private.h26
-rw-r--r--src/OFData.h2
-rw-r--r--src/OFData.m11
-rw-r--r--src/OFMutableData.m7
-rw-r--r--src/OFMutableURL.h7
-rw-r--r--src/OFMutableURL.m6
-rw-r--r--src/OFURL+Private.h26
-rw-r--r--src/OFURL.h2
-rw-r--r--src/OFURL.m11
9 files changed, 3 insertions, 95 deletions
diff --git a/src/OFData+Private.h b/src/OFData+Private.h
deleted file mode 100644
index ccae8792..00000000
--- a/src/OFData+Private.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
- * 2018
- * Jonathan Schleifer <js@heap.zone>
- *
- * 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
- * the packaging of this file.
- *
- * Alternatively, it may be distributed under the terms of the GNU General
- * Public License, either version 2 or 3, which can be found in the file
- * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
- * file.
- */
-
-#import "OFData.h"
-
-OF_ASSUME_NONNULL_BEGIN
-
-@interface OFData ()
-- (instancetype)of_init OF_METHOD_FAMILY(init);
-@end
-
-OF_ASSUME_NONNULL_END
diff --git a/src/OFData.h b/src/OFData.h
index 2ba3103e..3d95838f 100644
--- a/src/OFData.h
+++ b/src/OFData.h
@@ -177,8 +177,6 @@ enum {
*/
+ (instancetype)dataWithBase64EncodedString: (OFString *)string;
-- (instancetype)init OF_UNAVAILABLE;
-
/*!
* @brief Initialized an already allocated OFData with the specified `count`
* items of size 1.
diff --git a/src/OFData.m b/src/OFData.m
index c66bee35..4aa77655 100644
--- a/src/OFData.m
+++ b/src/OFData.m
@@ -22,7 +22,6 @@
#include <limits.h>
#import "OFData.h"
-#import "OFData+Private.h"
#import "OFDictionary.h"
#ifdef OF_HAVE_FILES
# import "OFFile.h"
@@ -115,16 +114,6 @@ _references_to_categories_of_OFData(void)
return [[[self alloc] initWithBase64EncodedString: string] autorelease];
}
-- (instancetype)init
-{
- OF_INVALID_INIT_METHOD
-}
-
-- (instancetype)of_init
-{
- return [super init];
-}
-
- (instancetype)initWithItems: (const void *)items
count: (size_t)count
{
diff --git a/src/OFMutableData.m b/src/OFMutableData.m
index bcdaf0ec..fff0f564 100644
--- a/src/OFMutableData.m
+++ b/src/OFMutableData.m
@@ -22,7 +22,6 @@
#include <limits.h>
#import "OFMutableData.h"
-#import "OFData+Private.h"
#import "OFString.h"
#import "OFInvalidArgumentException.h"
@@ -54,7 +53,7 @@
- (instancetype)init
{
- self = [super of_init];
+ self = [super init];
_itemSize = 1;
@@ -63,7 +62,7 @@
- (instancetype)initWithItemSize: (size_t)itemSize
{
- self = [super of_init];
+ self = [super init];
@try {
if (itemSize == 0)
@@ -87,7 +86,7 @@
- (instancetype)initWithItemSize: (size_t)itemSize
capacity: (size_t)capacity
{
- self = [super of_init];
+ self = [super init];
@try {
if (itemSize == 0)
diff --git a/src/OFMutableURL.h b/src/OFMutableURL.h
index 8961e099..a4431b55 100644
--- a/src/OFMutableURL.h
+++ b/src/OFMutableURL.h
@@ -144,13 +144,6 @@ OF_ASSUME_NONNULL_BEGIN
+ (instancetype)URL;
/*!
- * @brief Initializes an already allocated OFMutableURL.
- *
- * @return An initialized OFMutableURL
- */
-- (instancetype)init;
-
-/*!
* @brief Converts the mutable URL to an immutable URL.
*/
- (void)makeImmutable;
diff --git a/src/OFMutableURL.m b/src/OFMutableURL.m
index e7e198bb..aecac005 100644
--- a/src/OFMutableURL.m
+++ b/src/OFMutableURL.m
@@ -21,7 +21,6 @@
#import "OFArray.h"
#import "OFNumber.h"
#import "OFString.h"
-#import "OFURL+Private.h"
#import "OFInvalidFormatException.h"
@@ -37,11 +36,6 @@ extern void of_url_verify_escaped(OFString *, OFCharacterSet *);
return [[[self alloc] init] autorelease];
}
-- (instancetype)init
-{
- return [super of_init];
-}
-
- (void)setScheme: (OFString *)scheme
{
void *pool = objc_autoreleasePoolPush();
diff --git a/src/OFURL+Private.h b/src/OFURL+Private.h
deleted file mode 100644
index 6cb9683c..00000000
--- a/src/OFURL+Private.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
- * 2018
- * Jonathan Schleifer <js@heap.zone>
- *
- * 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
- * the packaging of this file.
- *
- * Alternatively, it may be distributed under the terms of the GNU General
- * Public License, either version 2 or 3, which can be found in the file
- * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
- * file.
- */
-
-#import "OFURL.h"
-
-OF_ASSUME_NONNULL_BEGIN
-
-@interface OFURL ()
-- (instancetype)of_init OF_METHOD_FAMILY(init);
-@end
-
-OF_ASSUME_NONNULL_END
diff --git a/src/OFURL.h b/src/OFURL.h
index fe56f4f6..941664bc 100644
--- a/src/OFURL.h
+++ b/src/OFURL.h
@@ -195,8 +195,6 @@ OF_ASSUME_NONNULL_BEGIN
isDirectory: (bool)isDirectory;
#endif
-- (instancetype)init OF_UNAVAILABLE;
-
/*!
* @brief Initializes an already allocated OFURL with the specified string.
*
diff --git a/src/OFURL.m b/src/OFURL.m
index b435af28..1f398b5a 100644
--- a/src/OFURL.m
+++ b/src/OFURL.m
@@ -21,7 +21,6 @@
#include <string.h>
#import "OFURL.h"
-#import "OFURL+Private.h"
#import "OFArray.h"
#import "OFNumber.h"
#import "OFString.h"
@@ -385,16 +384,6 @@ of_url_verify_escaped(OFString *string, OFCharacterSet *characterSet)
}
#endif
-- (instancetype)init
-{
- OF_INVALID_INIT_METHOD
-}
-
-- (instancetype)of_init
-{
- return [super init];
-}
-
- (instancetype)initWithString: (OFString *)string
{
char *UTF8String, *UTF8String2 = NULL;