summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyle.mm
diff options
context:
space:
mode:
authorAsheem Mamoowala <asheem.mamoowala@mapbox.com>2017-11-16 18:38:27 -0800
committerAsheem Mamoowala <asheem.mamoowala@mapbox.com>2017-11-22 13:56:38 -0800
commit3067b77c650f5dea0c00a7a92a9fc927e028c742 (patch)
tree407bf2b4bf19678f1e7c2418f4fd0b4e18fbfef6 /platform/darwin/src/MGLStyle.mm
parentba63d06cfc09b016ce0ddfcaaa297bd259cadf09 (diff)
downloadqtlocation-mapboxgl-3067b77c650f5dea0c00a7a92a9fc927e028c742.tar.gz
[core, ios, macos] Implement unique_any and remove linb::any
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 244fb94ef9..71f2785a94 100644
--- a/platform/darwin/src/MGLStyle.mm
+++ b/platform/darwin/src/MGLStyle.mm
@@ -221,7 +221,7 @@ static NSURL *MGLStyleURL_trafficNight;
}
- (MGLSource *)sourceFromMBGLSource:(mbgl::style::Source *)rawSource {
- if (MGLSource *source = rawSource->peer.empty() ? nil : mbgl::any_cast<SourceWrapper>(rawSource->peer).source) {
+ if (MGLSource *source = rawSource->peer.has_value() ? mbgl::util::any_cast<SourceWrapper>(rawSource->peer).source : nil) {
return source;
}
@@ -383,7 +383,7 @@ static NSURL *MGLStyleURL_trafficNight;
{
NSParameterAssert(rawLayer);
- if (MGLStyleLayer *layer = rawLayer->peer.empty() ? nil : mbgl::any_cast<LayerWrapper>(rawLayer->peer).layer) {
+ if (MGLStyleLayer *layer = rawLayer->peer.has_value() ? mbgl::util::any_cast<LayerWrapper>(&(rawLayer->peer))->layer : nil) {
return layer;
}