Fix one warning because local variable shadows the variable outside of block

This commit is contained in:
DreamPiggy 2023-09-12 14:39:12 +08:00
parent 345c935b8d
commit 57ebdeafcf
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;
}
}
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, ^{
[self _storeImageDataToDisk:data forKey:key];
[self _storeImageDataToDisk:encodedData forKey:key];
[self _archivedDataWithImage:image forKey:key];
if (completionBlock) {
[(queue ?: SDCallbackQueue.mainQueue) async:^{