Merge pull request #3599 from dreampiggy/bugfix/warning_garden

Fix one warning because local variable shadows the variable outside of block
This commit is contained in:
DreamPiggy 2023-09-12 14:40:24 +08:00 committed by GitHub
commit 27b5f0fa90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -269,9 +269,9 @@ static NSString * _defaultDiskCacheDirectory;
format = [SDImageCoderHelper CGImageContainsAlpha:image.CGImage] ? SDImageFormatPNG : SDImageFormatJPEG; format = [SDImageCoderHelper CGImageContainsAlpha:image.CGImage] ? SDImageFormatPNG : SDImageFormatJPEG;
} }
} }
NSData *data = [[SDImageCodersManager sharedManager] encodedDataWithImage:image format:format options:context[SDWebImageContextImageEncodeOptions]]; NSData *encodedData = [[SDImageCodersManager sharedManager] encodedDataWithImage:image format:format options:context[SDWebImageContextImageEncodeOptions]];
dispatch_async(self.ioQueue, ^{ dispatch_async(self.ioQueue, ^{
[self _storeImageDataToDisk:data forKey:key]; [self _storeImageDataToDisk:encodedData forKey:key];
[self _archivedDataWithImage:image forKey:key]; [self _archivedDataWithImage:image forKey:key];
if (completionBlock) { if (completionBlock) {
[(queue ?: SDCallbackQueue.mainQueue) async:^{ [(queue ?: SDCallbackQueue.mainQueue) async:^{