summaryrefslogtreecommitdiff
path: root/platform/darwin
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2018-07-24 21:25:21 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2018-08-08 14:14:34 +0300
commit3952ff5c343844d76f75ede0afc8ddad55748a0d (patch)
treed19172ad104ba520f7f8d1d939a1690791606993 /platform/darwin
parent990b3b11b9427ffd86f693d3f4c3dd351891e5d0 (diff)
downloadqtlocation-mapboxgl-3952ff5c343844d76f75ede0afc8ddad55748a0d.tar.gz
[core] Replace unique_any with peer from mapbox-bindgen
Diffstat (limited to 'platform/darwin')
-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 3f9bfbf8ca..e0415c02f7 100644
--- a/platform/darwin/src/MGLStyle.mm
+++ b/platform/darwin/src/MGLStyle.mm
@@ -177,7 +177,7 @@ static_assert(6 == mbgl::util::default_styles::numOrderedStyles,
}
- (MGLSource *)sourceFromMBGLSource:(mbgl::style::Source *)rawSource {
- if (MGLSource *source = rawSource->peer.has_value() ? mbgl::util::any_cast<SourceWrapper>(rawSource->peer).source : nil) {
+ if (MGLSource *source = rawSource->peer.has_value() ? rawSource->peer.get<SourceWrapper>().source : nil) {
return source;
}
@@ -341,7 +341,7 @@ static_assert(6 == mbgl::util::default_styles::numOrderedStyles,
{
NSParameterAssert(rawLayer);
- if (MGLStyleLayer *layer = rawLayer->peer.has_value() ? mbgl::util::any_cast<LayerWrapper>(&(rawLayer->peer))->layer : nil) {
+ if (MGLStyleLayer *layer = rawLayer->peer.has_value() ? rawLayer->peer.get<LayerWrapper>().layer : nil) {
return layer;
}