iOS:add NS_NOESCAPE attribute to avoid warnning
This commit is contained in:
parent
c712b1c0c0
commit
f44416a139
@ -21,11 +21,11 @@
|
|||||||
|
|
||||||
|
|
||||||
@interface NSObject (Doric)
|
@interface NSObject (Doric)
|
||||||
- (id)apply:(id (^)(id it))block;
|
- (id)apply:(id (NS_NOESCAPE ^)(id it))block;
|
||||||
|
|
||||||
- (instancetype)also:(void (^)(id it))block;
|
- (instancetype)also:(void (NS_NOESCAPE ^)(id it))block;
|
||||||
|
|
||||||
- (void)let:(void (^)(id it))block;
|
- (void)let:(void (NS_NOESCAPE ^)(id it))block;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSArray <ObjectType> (Doric)
|
@interface NSArray <ObjectType> (Doric)
|
||||||
|
@ -20,16 +20,16 @@
|
|||||||
#import "DoricExtensions.h"
|
#import "DoricExtensions.h"
|
||||||
|
|
||||||
@implementation NSObject (Doric)
|
@implementation NSObject (Doric)
|
||||||
- (id)apply:(id (^)(id it))block {
|
- (id)apply:(id (^)(NS_NOESCAPE id it))block {
|
||||||
return block(self);
|
return block(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (instancetype)also:(void (^)(id it))block {
|
- (instancetype)also:(void (NS_NOESCAPE ^)(id it))block {
|
||||||
block(self);
|
block(self);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)let:(void (^)(id it))block {
|
- (void)let:(void (NS_NOESCAPE ^)(id it))block {
|
||||||
block(self);
|
block(self);
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
Reference in New Issue
Block a user