diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-01-11 03:08:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-11 03:08:05 -0800 |
commit | 581fb3849da8ce97e557bb3633b886fcc369f6cb (patch) | |
tree | 503b3a3657d59218c40712c853640032c51da169 /platform/macos/src/NSImage+MGLAdditions.mm | |
parent | b6cf87f5e763ec6849e4fe34f2dd20fc8a0d0d52 (diff) | |
download | qtlocation-mapboxgl-581fb3849da8ce97e557bb3633b886fcc369f6cb.tar.gz |
[ios, macos] Fix miscellaneous static analyzer warnings (#7670)
* [ios, macos] Fixed static analyzer warnings
Fixed static analyzer warnings in MGLNetworkConfiguration, MGLRasterSource, and MGLShape.
* [ios] Fixed static analyzer warnings
Fixed static analyzer warnings in MGLAnnotationImage.
* [macos] Fixed static analyzer warnings
Fixed static analyzer warnings in MGLAnnotationImage and NSImage(MGLAdditions).
* [ios, macos] Two pointer-equal images are object-equal by definition
Diffstat (limited to 'platform/macos/src/NSImage+MGLAdditions.mm')
-rw-r--r-- | platform/macos/src/NSImage+MGLAdditions.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/macos/src/NSImage+MGLAdditions.mm b/platform/macos/src/NSImage+MGLAdditions.mm index 9036ab24ae..e8e84f0a03 100644 --- a/platform/macos/src/NSImage+MGLAdditions.mm +++ b/platform/macos/src/NSImage+MGLAdditions.mm @@ -6,7 +6,7 @@ std::string png = encodePNG(spriteImage->image); NSData *data = [[NSData alloc] initWithBytes:png.data() length:png.size()]; NSBitmapImageRep *rep = [NSBitmapImageRep imageRepWithData:data]; - if ([self initWithSize:NSMakeSize(spriteImage->getWidth(), spriteImage->getHeight())]) { + if (self = [self initWithSize:NSMakeSize(spriteImage->getWidth(), spriteImage->getHeight())]) { [self addRepresentation:rep]; [self setTemplate:spriteImage->sdf]; } |