From c327ee373793629606e4e439abc25e174e04844f Mon Sep 17 00:00:00 2001 From: Olivier Poitrey Date: Sat, 10 Mar 2012 17:34:34 +0100 Subject: [PATCH] Remove conditional activation of the new decoder optimization (now it's always activated) --- SDImageCache.m | 6 +----- SDWebImageDownloader.m | 9 --------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/SDImageCache.m b/SDImageCache.m index 1939036c..2039482d 100644 --- a/SDImageCache.m +++ b/SDImageCache.m @@ -9,10 +9,7 @@ #import "SDImageCache.h" #import "SDWebImageDecoder.h" #import - -#ifdef ENABLE_SDWEBIMAGE_DECODER #import "SDWebImageDecoder.h" -#endif static NSInteger cacheMaxCacheAge = 60*60*24*7; // 1 week @@ -181,13 +178,12 @@ static SDImageCache *instance; if (image) { -#ifdef ENABLE_SDWEBIMAGE_DECODER UIImage *decodedImage = [UIImage decodedImageWithImage:image]; if (decodedImage) { image = decodedImage; } -#endif + [mutableArguments setObject:image forKey:@"image"]; } diff --git a/SDWebImageDownloader.m b/SDWebImageDownloader.m index e0956eb9..b7526899 100644 --- a/SDWebImageDownloader.m +++ b/SDWebImageDownloader.m @@ -8,11 +8,9 @@ #import "SDWebImageDownloader.h" -#ifdef ENABLE_SDWEBIMAGE_DECODER #import "SDWebImageDecoder.h" @interface SDWebImageDownloader (ImageDecoder) @end -#endif NSString *const SDWebImageDownloadStartNotification = @"SDWebImageDownloadStartNotification"; NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNotification"; @@ -126,12 +124,7 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot if ([delegate respondsToSelector:@selector(imageDownloader:didFinishWithImage:)]) { UIImage *image = SDScaledImageForPath(url.absoluteString, imageData); - -#ifdef ENABLE_SDWEBIMAGE_DECODER [[SDWebImageDecoder sharedImageDecoder] decodeImage:image withDelegate:self userInfo:nil]; -#else - [delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image]; -#endif SDWIRelease(image) } } @@ -151,12 +144,10 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot #pragma mark SDWebImageDecoderDelegate -#ifdef ENABLE_SDWEBIMAGE_DECODER - (void)imageDecoder:(SDWebImageDecoder *)decoder didFinishDecodingImage:(UIImage *)image userInfo:(NSDictionary *)userInfo { [delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image]; } -#endif #pragma mark NSObject