summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyle.mm
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-03-12 15:43:33 -0700
committerMinh Nguyễn <mxn@1ec5.org>2017-03-13 11:05:38 -0700
commit936cc33d5291a77bc4e0dda9c7956860bef5f872 (patch)
treed61ad0ed53925c522c8eb7d59adee1ec5f8ff436 /platform/darwin/src/MGLStyle.mm
parent5120cbada432b7bce9553f8857e2c3541be8cdb0 (diff)
downloadqtlocation-mapboxgl-936cc33d5291a77bc4e0dda9c7956860bef5f872.tar.gz
[ios, macos] Resolved unused variable warnings
Resolved unused variable warnings in Release configuration that occurred because they were only used within NSAssert() invocations, which are omitted from Release builds.
Diffstat (limited to 'platform/darwin/src/MGLStyle.mm')
-rw-r--r--platform/darwin/src/MGLStyle.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/darwin/src/MGLStyle.mm b/platform/darwin/src/MGLStyle.mm
index 2e999a5165..aa493d9ef7 100644
--- a/platform/darwin/src/MGLStyle.mm
+++ b/platform/darwin/src/MGLStyle.mm
@@ -341,10 +341,10 @@ static NSURL *MGLStyleURL_emerald;
styleLayer = [[MGLCircleStyleLayer alloc] initWithIdentifier:identifier source:source];
} else if (mbglLayer->is<mbgl::style::BackgroundLayer>()) {
styleLayer = [[MGLBackgroundStyleLayer alloc] initWithIdentifier:identifier];
- } else if (auto customLayer = mbglLayer->as<mbgl::style::CustomLayer>()) {
+ } else if (mbglLayer->is<mbgl::style::CustomLayer>()) {
styleLayer = self.openGLLayers[identifier];
if (styleLayer) {
- NSAssert(styleLayer.rawLayer == customLayer, @"%@ wraps a CustomLayer that differs from the one associated with the underlying style.", styleLayer);
+ NSAssert(styleLayer.rawLayer == mbglLayer->as<mbgl::style::CustomLayer>(), @"%@ wraps a CustomLayer that differs from the one associated with the underlying style.", styleLayer);
return styleLayer;
}
styleLayer = [[MGLOpenGLStyleLayer alloc] initWithIdentifier:identifier];