From 83f0ce3c26589f1cee5dbb103fca399ae074eadf Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Wed, 1 Jun 2011 10:37:43 -0500 Subject: [PATCH] Using more concise initializer for AFImageRequestOperationCallback --- AFImageRequest.m | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/AFImageRequest.m b/AFImageRequest.m index dd282c5..2210155 100644 --- a/AFImageRequest.m +++ b/AFImageRequest.m @@ -54,9 +54,7 @@ static NSMutableSet *_cachedRequests = nil; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLCacheStorageAllowed timeoutInterval:30.0]; [request setHTTPShouldHandleCookies:NO]; - AFImageRequestOperationCallback *callback = [AFImageRequestOperationCallback callbackWithSuccess:block]; - callback.options = options; - callback.imageSize = imageSize; + AFImageRequestOperationCallback *callback = [AFImageRequestOperationCallback callbackWithSuccess:block imageSize:imageSize options:options]; AFImageRequestOperation *operation = [[[AFImageRequestOperation alloc] initWithRequest:request callback:callback] autorelease]; NSCachedURLResponse *cachedResponse = [[[[AFURLCache sharedURLCache] cachedResponseForRequest:request] retain] autorelease]; @@ -91,7 +89,7 @@ static NSMutableSet *_cachedRequests = nil; if (!([operation isExecuting] || [operation isCancelled])) { [operation cancel]; } - } + } } @end