mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Replace use of -performSelector:withObject:
This commit is contained in:
1 parent
f46d7b5c1e
commit
76ce31f2f6
2 files changed
+11
-8
No files matched your search
@@ -18,7 +18,7 @@
|
||||
+ (BOOL)canUnarchivePath:(NSString *)path;
|
||||
- (id)initWithPath:(NSString *)path host:(SUHost *)host;
|
||||
|
||||
- (void)notifyDelegateOfExtractedLength:(NSNumber *)length;
|
||||
- (void)notifyDelegateOfExtractedLength:(size_t)length;
|
||||
- (void)notifyDelegateOfSuccess;
|
||||
- (void)notifyDelegateOfFailure;
|
||||
@end
|
||||
|
||||
+10
-7
@@ -32,22 +32,25 @@
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)notifyDelegateOfExtractedLength:(NSNumber *)length
|
||||
- (void)notifyDelegateOfExtractedLength:(size_t)length
|
||||
{
|
||||
if ([delegate respondsToSelector:@selector(unarchiver:extractedLength:)])
|
||||
[delegate unarchiver:self extractedLength:[length unsignedLongValue]];
|
||||
if ([delegate respondsToSelector:@selector(unarchiver:extractedLength:)]) {
|
||||
[delegate unarchiver:self extractedLength:length];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)notifyDelegateOfSuccess
|
||||
{
|
||||
if ([delegate respondsToSelector:@selector(unarchiverDidFinish:)])
|
||||
[delegate performSelector:@selector(unarchiverDidFinish:) withObject:self];
|
||||
if ([delegate respondsToSelector:@selector(unarchiverDidFinish:)]) {
|
||||
[delegate unarchiverDidFinish:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)notifyDelegateOfFailure
|
||||
{
|
||||
if ([delegate respondsToSelector:@selector(unarchiverDidFail:)])
|
||||
[delegate performSelector:@selector(unarchiverDidFail:) withObject:self];
|
||||
if ([delegate respondsToSelector:@selector(unarchiverDidFail:)]) {
|
||||
[delegate unarchiverDidFail:self];
|
||||
}
|
||||
}
|
||||
|
||||
static NSMutableArray *gUnarchiverImplementations;
|
||||
|
||||
Reference in new issue
Block a user