Authored by Olivier Poitrey

Remove conditional activation of the new decoder optimization (now it's always activated)

@@ -9,10 +9,7 @@ @@ -9,10 +9,7 @@
9 #import "SDImageCache.h" 9 #import "SDImageCache.h"
10 #import "SDWebImageDecoder.h" 10 #import "SDWebImageDecoder.h"
11 #import <CommonCrypto/CommonDigest.h> 11 #import <CommonCrypto/CommonDigest.h>
12 -  
13 -#ifdef ENABLE_SDWEBIMAGE_DECODER  
14 #import "SDWebImageDecoder.h" 12 #import "SDWebImageDecoder.h"
15 -#endif  
16 13
17 static NSInteger cacheMaxCacheAge = 60*60*24*7; // 1 week 14 static NSInteger cacheMaxCacheAge = 60*60*24*7; // 1 week
18 15
@@ -181,13 +178,12 @@ static SDImageCache *instance; @@ -181,13 +178,12 @@ static SDImageCache *instance;
181 178
182 if (image) 179 if (image)
183 { 180 {
184 -#ifdef ENABLE_SDWEBIMAGE_DECODER  
185 UIImage *decodedImage = [UIImage decodedImageWithImage:image]; 181 UIImage *decodedImage = [UIImage decodedImageWithImage:image];
186 if (decodedImage) 182 if (decodedImage)
187 { 183 {
188 image = decodedImage; 184 image = decodedImage;
189 } 185 }
190 -#endif 186 +
191 [mutableArguments setObject:image forKey:@"image"]; 187 [mutableArguments setObject:image forKey:@"image"];
192 } 188 }
193 189
@@ -8,11 +8,9 @@ @@ -8,11 +8,9 @@
8 8
9 #import "SDWebImageDownloader.h" 9 #import "SDWebImageDownloader.h"
10 10
11 -#ifdef ENABLE_SDWEBIMAGE_DECODER  
12 #import "SDWebImageDecoder.h" 11 #import "SDWebImageDecoder.h"
13 @interface SDWebImageDownloader (ImageDecoder) <SDWebImageDecoderDelegate> 12 @interface SDWebImageDownloader (ImageDecoder) <SDWebImageDecoderDelegate>
14 @end 13 @end
15 -#endif  
16 14
17 NSString *const SDWebImageDownloadStartNotification = @"SDWebImageDownloadStartNotification"; 15 NSString *const SDWebImageDownloadStartNotification = @"SDWebImageDownloadStartNotification";
18 NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNotification"; 16 NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNotification";
@@ -126,12 +124,7 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot @@ -126,12 +124,7 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot
126 if ([delegate respondsToSelector:@selector(imageDownloader:didFinishWithImage:)]) 124 if ([delegate respondsToSelector:@selector(imageDownloader:didFinishWithImage:)])
127 { 125 {
128 UIImage *image = SDScaledImageForPath(url.absoluteString, imageData); 126 UIImage *image = SDScaledImageForPath(url.absoluteString, imageData);
129 -  
130 -#ifdef ENABLE_SDWEBIMAGE_DECODER  
131 [[SDWebImageDecoder sharedImageDecoder] decodeImage:image withDelegate:self userInfo:nil]; 127 [[SDWebImageDecoder sharedImageDecoder] decodeImage:image withDelegate:self userInfo:nil];
132 -#else  
133 - [delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image];  
134 -#endif  
135 SDWIRelease(image) 128 SDWIRelease(image)
136 } 129 }
137 } 130 }
@@ -151,12 +144,10 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot @@ -151,12 +144,10 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot
151 144
152 #pragma mark SDWebImageDecoderDelegate 145 #pragma mark SDWebImageDecoderDelegate
153 146
154 -#ifdef ENABLE_SDWEBIMAGE_DECODER  
155 - (void)imageDecoder:(SDWebImageDecoder *)decoder didFinishDecodingImage:(UIImage *)image userInfo:(NSDictionary *)userInfo 147 - (void)imageDecoder:(SDWebImageDecoder *)decoder didFinishDecodingImage:(UIImage *)image userInfo:(NSDictionary *)userInfo
156 { 148 {
157 [delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image]; 149 [delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image];
158 } 150 }
159 -#endif  
160 151
161 #pragma mark NSObject 152 #pragma mark NSObject
162 153