summaryrefslogtreecommitdiff
path: root/platform/android/src/style/sources/source.cpp
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/android/src/style/sources/source.cpp
parent990b3b11b9427ffd86f693d3f4c3dd351891e5d0 (diff)
downloadqtlocation-mapboxgl-3952ff5c343844d76f75ede0afc8ddad55748a0d.tar.gz
[core] Replace unique_any with peer from mapbox-bindgen
Diffstat (limited to 'platform/android/src/style/sources/source.cpp')
-rw-r--r--platform/android/src/style/sources/source.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/android/src/style/sources/source.cpp b/platform/android/src/style/sources/source.cpp
index 413530a5ec..5f68e40467 100644
--- a/platform/android/src/style/sources/source.cpp
+++ b/platform/android/src/style/sources/source.cpp
@@ -51,7 +51,7 @@ namespace android {
if (!coreSource.peer.has_value()) {
coreSource.peer = createSourcePeer(env, coreSource, frontend);
}
- return *mbgl::util::any_cast<std::unique_ptr<Source>>(&coreSource.peer)->get()->javaPeer;
+ return *coreSource.peer.get<std::unique_ptr<Source>>()->javaPeer;
}
Source::Source(jni::JNIEnv& env, mbgl::style::Source& coreSource, jni::Object<Source> obj, AndroidRendererFrontend& frontend)
@@ -125,7 +125,7 @@ namespace android {
// Release the peer relationships. These will be re-established when the source is added to a map
assert(ownedSource->peer.has_value());
- util::any_cast<std::unique_ptr<Source>>(&(ownedSource->peer))->release();
+ ownedSource->peer.get<std::unique_ptr<Source>>().release();
ownedSource->peer.reset();
// Release the strong reference to the java peer