Authored by Bogdan Poplauschi

Merge pull request #1971 from kekeYezi/master

Small change - coding style
@@ -351,8 +351,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) { @@ -351,8 +351,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
351 image = [UIImage decodedImageWithImage:image]; 351 image = [UIImage decodedImageWithImage:image];
352 } 352 }
353 return image; 353 return image;
354 - }  
355 - else { 354 + } else {
356 return nil; 355 return nil;
357 } 356 }
358 } 357 }
@@ -28,8 +28,7 @@ inline UIImage *SDScaledImageForKey(NSString * _Nullable key, UIImage * _Nullabl @@ -28,8 +28,7 @@ inline UIImage *SDScaledImageForKey(NSString * _Nullable key, UIImage * _Nullabl
28 } 28 }
29 29
30 return [UIImage animatedImageWithImages:scaledImages duration:image.duration]; 30 return [UIImage animatedImageWithImages:scaledImages duration:image.duration];
31 - }  
32 - else { 31 + } else {
33 #if SD_WATCH 32 #if SD_WATCH
34 if ([[WKInterfaceDevice currentDevice] respondsToSelector:@selector(screenScale)]) { 33 if ([[WKInterfaceDevice currentDevice] respondsToSelector:@selector(screenScale)]) {
35 #elif SD_UIKIT 34 #elif SD_UIKIT
@@ -119,8 +119,7 @@ @@ -119,8 +119,7 @@
119 - (void)setValue:(nullable NSString *)value forHTTPHeaderField:(nullable NSString *)field { 119 - (void)setValue:(nullable NSString *)value forHTTPHeaderField:(nullable NSString *)field {
120 if (value) { 120 if (value) {
121 self.HTTPHeaders[field] = value; 121 self.HTTPHeaders[field] = value;
122 - }  
123 - else { 122 + } else {
124 [self.HTTPHeaders removeObjectForKey:field]; 123 [self.HTTPHeaders removeObjectForKey:field];
125 } 124 }
126 } 125 }
@@ -264,7 +263,7 @@ @@ -264,7 +263,7 @@
264 } 263 }
265 264
266 - (void)setSuspended:(BOOL)suspended { 265 - (void)setSuspended:(BOOL)suspended {
267 - (self.downloadQueue).suspended = suspended; 266 + self.downloadQueue.suspended = suspended;
268 } 267 }
269 268
270 - (void)cancelAllDownloads { 269 - (void)cancelAllDownloads {
@@ -272,8 +272,7 @@ didReceiveResponse:(NSURLResponse *)response @@ -272,8 +272,7 @@ didReceiveResponse:(NSURLResponse *)response
272 dispatch_async(dispatch_get_main_queue(), ^{ 272 dispatch_async(dispatch_get_main_queue(), ^{
273 [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadReceiveResponseNotification object:weakSelf]; 273 [[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadReceiveResponseNotification object:weakSelf];
274 }); 274 });
275 - }  
276 - else { 275 + } else {
277 NSUInteger code = ((NSHTTPURLResponse *)response).statusCode; 276 NSUInteger code = ((NSHTTPURLResponse *)response).statusCode;
278 277
279 //This is the case when server returns '304 Not Modified'. It means that remote image is not changed. 278 //This is the case when server returns '304 Not Modified'. It means that remote image is not changed.
@@ -61,7 +61,7 @@ typedef void(^SDWebImagePrefetcherCompletionBlock)(NSUInteger noOfFinishedUrls, @@ -61,7 +61,7 @@ typedef void(^SDWebImagePrefetcherCompletionBlock)(NSUInteger noOfFinishedUrls,
61 /** 61 /**
62 * Queue options for Prefetcher. Defaults to Main Queue. 62 * Queue options for Prefetcher. Defaults to Main Queue.
63 */ 63 */
64 -@property (nonatomic, assign, nonnull) dispatch_queue_t prefetcherQueue; 64 +@property (SDDispatchQueueSetterSementics, nonatomic, nonnull) dispatch_queue_t prefetcherQueue;
65 65
66 @property (weak, nonatomic, nullable) id <SDWebImagePrefetcherDelegate> delegate; 66 @property (weak, nonatomic, nullable) id <SDWebImagePrefetcherDelegate> delegate;
67 67