diff options
author | Nikolay Morev <n.morev@corp.mail.ru> | 2016-02-09 16:40:09 +0300 |
---|---|---|
committer | Nikolay Morev <n.morev@corp.mail.ru> | 2016-02-09 16:43:07 +0300 |
commit | 1b18cb5df83eda129fba6c23bed955d9e4a2bbf8 (patch) | |
tree | 927857b16fe71a7aa9291b6fcda43ac46fb9b3ab /src/objc | |
parent | 5b694c89ebe98f388af25ad8f176f42523594358 (diff) |
Mark non-designated initializers and new as unavailable
Diffstat (limited to 'src/objc')
-rw-r--r-- | src/objc/abstract/MCOAbstractMessage.h | 4 | ||||
-rw-r--r-- | src/objc/abstract/MCOAbstractPart.h | 2 | ||||
-rw-r--r-- | src/objc/provider/MCOMailProvider.h | 2 | ||||
-rw-r--r-- | src/objc/provider/MCONetService.h | 2 | ||||
-rw-r--r-- | src/objc/utils/MCOOperation.h | 3 |
5 files changed, 13 insertions, 0 deletions
diff --git a/src/objc/abstract/MCOAbstractMessage.h b/src/objc/abstract/MCOAbstractMessage.h index ed858808..bc9b26f7 100644 --- a/src/objc/abstract/MCOAbstractMessage.h +++ b/src/objc/abstract/MCOAbstractMessage.h @@ -25,6 +25,10 @@ namespace mailcore { #ifdef __cplusplus - (instancetype) initWithMCMessage:(mailcore::AbstractMessage *)message NS_DESIGNATED_INITIALIZER; +/** Do not invoke this directly. */ +- (instancetype) init NS_UNAVAILABLE; +/** Do not invoke this directly. */ ++ (instancetype) new NS_UNAVAILABLE; #endif /** Header of the message. */ diff --git a/src/objc/abstract/MCOAbstractPart.h b/src/objc/abstract/MCOAbstractPart.h index 0e768215..8bff41dd 100644 --- a/src/objc/abstract/MCOAbstractPart.h +++ b/src/objc/abstract/MCOAbstractPart.h @@ -113,6 +113,8 @@ namespace mailcore { /** Do not invoke this directly. */ - (instancetype) init NS_UNAVAILABLE; +/** Do not invoke this directly. */ ++ (instancetype) new NS_UNAVAILABLE; @end diff --git a/src/objc/provider/MCOMailProvider.h b/src/objc/provider/MCOMailProvider.h index f2deff4e..513d568e 100644 --- a/src/objc/provider/MCOMailProvider.h +++ b/src/objc/provider/MCOMailProvider.h @@ -89,5 +89,7 @@ /** Do not invoke this directly. */ - (instancetype) init NS_UNAVAILABLE; +/** Do not invoke this directly. */ ++ (instancetype) new NS_UNAVAILABLE; @end diff --git a/src/objc/provider/MCONetService.h b/src/objc/provider/MCONetService.h index f186e811..0d707152 100644 --- a/src/objc/provider/MCONetService.h +++ b/src/objc/provider/MCONetService.h @@ -44,5 +44,7 @@ /** Do not invoke this directly. */ - (instancetype) init NS_UNAVAILABLE; +/** Do not invoke this directly. */ ++ (instancetype) new NS_UNAVAILABLE; @end diff --git a/src/objc/utils/MCOOperation.h b/src/objc/utils/MCOOperation.h index 7e37ce34..65f77681 100644 --- a/src/objc/utils/MCOOperation.h +++ b/src/objc/utils/MCOOperation.h @@ -40,7 +40,10 @@ @interface MCOOperation (MCOUnavailable) +/** Do not invoke this directly. */ - (instancetype) init NS_UNAVAILABLE; +/** Do not invoke this directly. */ ++ (instancetype) new NS_UNAVAILABLE; @end |