From d19311e08cee3bb4d4c6ec9c6f8d3a4620d1ebac Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Tue, 17 Apr 2018 11:27:50 +0800 Subject: [PATCH] Revert "Fix two warnings about losing precision in comparison" This reverts commit a710bc547275bb0311a45b5f356e2313562f764c. --- SDWebImage/SDWebImageDownloaderOperation.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SDWebImage/SDWebImageDownloaderOperation.m b/SDWebImage/SDWebImageDownloaderOperation.m index 3c17b2fd..5d0c5d1d 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) NSUInteger expectedSize; +@property (assign, nonatomic, readwrite) long long 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 NSUInteger totalSize = imageData.length; + const NSInteger totalSize = imageData.length; // Get the finish status BOOL finished = (totalSize >= self.expectedSize);