Remove the extra __block mark and the early weakOperation define
This commit is contained in:
parent
3b4dd0b184
commit
4e5af52fd0
|
@ -125,9 +125,8 @@
|
|||
url = nil;
|
||||
}
|
||||
|
||||
__block SDWebImageCombinedOperation *operation = [SDWebImageCombinedOperation new];
|
||||
SDWebImageCombinedOperation *operation = [SDWebImageCombinedOperation new];
|
||||
operation.manager = self;
|
||||
__weak SDWebImageCombinedOperation *weakOperation = operation;
|
||||
|
||||
BOOL isFailedUrl = NO;
|
||||
if (url) {
|
||||
|
@ -150,7 +149,8 @@
|
|||
if (options & SDWebImageCacheMemoryOnly) cacheOptions |= SDImageCacheQueryMemoryOnly;
|
||||
if (options & SDWebImageQueryDataWhenInMemory) cacheOptions |= SDImageCacheQueryDataWhenInMemory;
|
||||
if (options & SDWebImageQueryDiskSync) cacheOptions |= SDImageCacheQueryDiskSync;
|
||||
|
||||
|
||||
__weak SDWebImageCombinedOperation *weakOperation = operation;
|
||||
operation.cacheOperation = [self.imageCache queryCacheOperationForKey:key options:cacheOptions done:^(UIImage *cachedImage, NSData *cachedData, SDImageCacheType cacheType) {
|
||||
__strong __typeof(weakOperation) strongOperation = weakOperation;
|
||||
if (!strongOperation || strongOperation.isCancelled) {
|
||||
|
|
Loading…
Reference in New Issue