Minor code formatting

This commit is contained in:
Mattt Thompson 2011-12-13 09:39:31 -06:00
parent 6d15ca8807
commit a5b33d573a

View file

@ -35,7 +35,6 @@ static inline NSString * AFImageCacheKeyFromURLAndCacheName(NSURL *url, NSString
+ (AFImageCache *)sharedImageCache { + (AFImageCache *)sharedImageCache {
static AFImageCache *_sharedImageCache = nil; static AFImageCache *_sharedImageCache = nil;
static dispatch_once_t oncePredicate; static dispatch_once_t oncePredicate;
dispatch_once(&oncePredicate, ^{ dispatch_once(&oncePredicate, ^{
_sharedImageCache = [[self alloc] init]; _sharedImageCache = [[self alloc] init];
}); });
@ -45,11 +44,13 @@ static inline NSString * AFImageCacheKeyFromURLAndCacheName(NSURL *url, NSString
- (id)init { - (id)init {
self = [super init]; self = [super init];
if (self) { if (!self) {
#if __IPHONE_OS_VERSION_MIN_REQUIRED return nil;
self.imageScale = [[UIScreen mainScreen] scale];
#endif
} }
#if __IPHONE_OS_VERSION_MIN_REQUIRED
self.imageScale = [[UIScreen mainScreen] scale];
#endif
return self; return self;
} }