diff options
author | Julian Rex <julian.rex@mapbox.com> | 2019-04-30 17:08:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-30 17:08:37 -0400 |
commit | 9bd59bf041b0d0ca400f586fdbfed53d06258613 (patch) | |
tree | 03306eb75f839c993c4c4c2881f7381e9329c03f /platform/ios/vendor/SMCalloutView/SMCalloutView.m | |
parent | b15b78346fe44afbdb81934606ab63252df96b66 (diff) | |
download | qtlocation-mapboxgl-9bd59bf041b0d0ca400f586fdbfed53d06258613.tar.gz |
[ios, macos] Fixes for static analyzer warnings (#14453)
Diffstat (limited to 'platform/ios/vendor/SMCalloutView/SMCalloutView.m')
-rwxr-xr-x | platform/ios/vendor/SMCalloutView/SMCalloutView.m | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/platform/ios/vendor/SMCalloutView/SMCalloutView.m b/platform/ios/vendor/SMCalloutView/SMCalloutView.m index 66a7b5a7a7..0520ba08a5 100755 --- a/platform/ios/vendor/SMCalloutView/SMCalloutView.m +++ b/platform/ios/vendor/SMCalloutView/SMCalloutView.m @@ -554,13 +554,18 @@ NSTimeInterval const kMGLSMCalloutViewRepositionDelayForUIScrollView = 1.0/3.0; stretch.toValue = presenting ? @1.0 : @0.0; animation = stretch; } - + + NSAssert(animation, @"There should be an animation"); + // CAAnimation is KVC compliant, so we can store whether we're presenting for lookup in our delegate methods [animation setValue:@(presenting) forKey:@"presenting"]; animation.fillMode = kCAFillModeForwards; animation.removedOnCompletion = NO; - return animation; + + // Cast as non-null to mute static analysis warning as documented at + // https://clang-analyzer.llvm.org/faq.html#decide_nullability + return (CAAnimation * _Nonnull)animation; } - (void)layoutSubviews { |