From 64b4c2453557a1a167837132796ce1664fe69b2f Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Tue, 5 Nov 2019 11:36:00 +0800 Subject: [PATCH] Code indent garden --- SDWebImage/Core/SDAnimatedImagePlayer.m | 12 +++++------- SDWebImage/Core/SDAnimatedImageView.m | 3 ++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/SDWebImage/Core/SDAnimatedImagePlayer.m b/SDWebImage/Core/SDAnimatedImagePlayer.m index 2006b31e..a1b10ebc 100644 --- a/SDWebImage/Core/SDAnimatedImagePlayer.m +++ b/SDWebImage/Core/SDAnimatedImagePlayer.m @@ -44,9 +44,9 @@ // Get the current frame and loop count. self.totalLoopCount = provider.animatedImageLoopCount; self.animatedProvider = provider; - #if SD_UIKIT - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveMemoryWarning:) name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; - #endif +#if SD_UIKIT + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveMemoryWarning:) name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; +#endif } return self; } @@ -111,8 +111,7 @@ return _displayLink; } -- (void)setRunLoopMode:(NSRunLoopMode)runLoopMode -{ +- (void)setRunLoopMode:(NSRunLoopMode)runLoopMode { if ([_runLoopMode isEqual:runLoopMode]) { return; } @@ -127,8 +126,7 @@ _runLoopMode = [runLoopMode copy]; } -- (NSRunLoopMode)runLoopMode -{ +- (NSRunLoopMode)runLoopMode { if (!_runLoopMode) { _runLoopMode = [[self class] defaultRunLoopMode]; } diff --git a/SDWebImage/Core/SDAnimatedImageView.m b/SDWebImage/Core/SDAnimatedImageView.m index 969fcec7..88412aac 100644 --- a/SDWebImage/Core/SDAnimatedImageView.m +++ b/SDWebImage/Core/SDAnimatedImageView.m @@ -382,7 +382,8 @@ } // Check if image can represent a `Progressive Animated Image` during loading -- (id)progressiveAnimatedCoderForImage:(UIImage *)image { +- (id)progressiveAnimatedCoderForImage:(UIImage *)image +{ if ([image.class conformsToProtocol:@protocol(SDAnimatedImage)] && image.sd_isIncremental && [image respondsToSelector:@selector(animatedCoder)]) { id animatedCoder = [(id)image animatedCoder]; if ([animatedCoder conformsToProtocol:@protocol(SDProgressiveImageCoder)]) {