From d9c93e1a86cf64ff1c4940729e5db822e3ad1d9d Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Tue, 17 Apr 2018 13:01:10 +0800 Subject: [PATCH] Revert "Revert "Fix two warnings about losing precision in comparison"" This reverts commit d19311e08cee3bb4d4c6ec9c6f8d3a4620d1ebac. --- SDWebImage/SDWebImageDownloaderOperation.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SDWebImage/SDWebImageDownloaderOperation.m b/SDWebImage/SDWebImageDownloaderOperation.m index 5d0c5d1d..3c17b2fd 100644 --- a/SDWebImage/SDWebImageDownloaderOperation.m +++ b/SDWebImage/SDWebImageDownloaderOperation.m @@ -46,7 +46,7 @@ typedef NSMutableDictionary SDCallbacksDictionary; @property (strong, nonatomic, nullable) NSMutableData *imageData; @property (copy, nonatomic, nullable) NSData *cachedData; // for `SDWebImageDownloaderIgnoreCachedResponse` @property (copy, nonatomic, nullable) NSString *cacheKey; -@property (assign, nonatomic, readwrite) long long expectedSize; +@property (assign, nonatomic, readwrite) NSUInteger expectedSize; @property (strong, nonatomic, nullable, readwrite) NSURLResponse *response; // This is weak because it is injected by whoever manages this session. If this gets nil-ed out, we won't be able to run @@ -342,7 +342,7 @@ didReceiveResponse:(NSURLResponse *)response // Get the image data __block NSData *imageData = [self.imageData copy]; // Get the total bytes downloaded - const NSInteger totalSize = imageData.length; + const NSUInteger totalSize = imageData.length; // Get the finish status BOOL finished = (totalSize >= self.expectedSize);