Merge pull request #3484 from dreampiggy/garden/objc_bool_yes_no
Code garden to change Objc bool from true/false to YES/NO
This commit is contained in:
commit
2382c58421
|
@ -249,9 +249,9 @@
|
|||
} else if (self.playbackMode == SDAnimatedImagePlaybackModeBounce ||
|
||||
self.playbackMode == SDAnimatedImagePlaybackModeReversedBounce) {
|
||||
if (currentFrameIndex == 0) {
|
||||
self.shouldReverse = false;
|
||||
self.shouldReverse = NO;
|
||||
} else if (currentFrameIndex == totalFrameCount - 1) {
|
||||
self.shouldReverse = true;
|
||||
self.shouldReverse = YES;
|
||||
}
|
||||
nextFrameIndex = self.shouldReverse ? (currentFrameIndex - 1) : (currentFrameIndex + 1);
|
||||
nextFrameIndex %= totalFrameCount;
|
||||
|
|
|
@ -518,7 +518,7 @@ didReceiveResponse:(NSURLResponse *)response
|
|||
if (dataOperation) {
|
||||
@synchronized (dataOperation) {
|
||||
// Mark the downloader operation `isCompleted = YES`, no longer re-use this operation when new request comes in
|
||||
SDWebImageDownloaderOperationSetCompleted(dataOperation, true);
|
||||
SDWebImageDownloaderOperationSetCompleted(dataOperation, YES);
|
||||
}
|
||||
}
|
||||
if ([dataOperation respondsToSelector:@selector(URLSession:task:didCompleteWithError:)]) {
|
||||
|
|
|
@ -680,7 +680,7 @@ static BOOL _isCalled;
|
|||
player.playbackMode = SDAnimatedImagePlaybackModeBounce;
|
||||
|
||||
__block NSInteger i = 0;
|
||||
__block BOOL flag = false;
|
||||
__block BOOL flag = NO;
|
||||
__block NSUInteger cnt = 0;
|
||||
__weak typeof(imageView) wimageView = imageView;
|
||||
[player setAnimationFrameHandler:^(NSUInteger index, UIImage * _Nonnull frame) {
|
||||
|
@ -689,10 +689,10 @@ static BOOL _isCalled;
|
|||
|
||||
if (index >= player.totalFrameCount - 1) {
|
||||
cnt++;
|
||||
flag = true;
|
||||
flag = YES;
|
||||
} else if (cnt != 0 && index == 0) {
|
||||
cnt++;
|
||||
flag = false;
|
||||
flag = NO;
|
||||
}
|
||||
|
||||
if (!flag) {
|
||||
|
@ -745,7 +745,7 @@ static BOOL _isCalled;
|
|||
flag = false;
|
||||
} else if (index == 0) {
|
||||
cnt++;
|
||||
flag = true;
|
||||
flag = YES;
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
|
|
|
@ -233,7 +233,7 @@ static NSString *kTestImageKeyPNG = @"TestImageKey.png";
|
|||
[SDImageCache.sharedImageCache removeImageFromDiskForKey:key];
|
||||
__block BOOL callced = NO;
|
||||
SDImageCacheToken *token = [SDImageCache.sharedImageCache queryCacheOperationForKey:key done:^(UIImage * _Nullable image, NSData * _Nullable data, SDImageCacheType cacheType) {
|
||||
callced = true;
|
||||
callced = YES;
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0), dispatch_get_main_queue(), ^{
|
||||
[expectation fulfill]; // callback once fulfill once
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue