From 76ce31f2f6bd53753dd3f1fa5f7c647776db2188 Mon Sep 17 00:00:00 2001 From: Zachary Waldowski Date: Sat, 14 Jun 2014 13:16:12 -0400 Subject: [PATCH] Replace use of -performSelector:withObject: --- SUUnarchiver_Private.h | 2 +- SUUnarchiver_Private.m | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/SUUnarchiver_Private.h b/SUUnarchiver_Private.h index a567e49d..384edb7c 100644 --- a/SUUnarchiver_Private.h +++ b/SUUnarchiver_Private.h @@ -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 diff --git a/SUUnarchiver_Private.m b/SUUnarchiver_Private.m index bad6f6f3..da88bda6 100644 --- a/SUUnarchiver_Private.m +++ b/SUUnarchiver_Private.m @@ -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;