summaryrefslogtreecommitdiff
path: root/platform/android/src/annotation/polyline.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2018-08-22 12:27:43 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2018-09-06 17:26:28 -0700
commit9cd50a891dbd320e9e4816eef4545e0a41f9ab32 (patch)
treeb424e2dcee3090d9c3f37864112d19799dd9af35 /platform/android/src/annotation/polyline.cpp
parent70a204924552463eaeca975a5dd28c00b21aa53d (diff)
downloadqtlocation-mapboxgl-upstream/jni.hpp-4.tar.gz
[android] jni.hpp 4.0.0upstream/jni.hpp-4
Diffstat (limited to 'platform/android/src/annotation/polyline.cpp')
-rw-r--r--platform/android/src/annotation/polyline.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/android/src/annotation/polyline.cpp b/platform/android/src/annotation/polyline.cpp
index 080efa1960..d6161e856e 100644
--- a/platform/android/src/annotation/polyline.cpp
+++ b/platform/android/src/annotation/polyline.cpp
@@ -5,15 +5,15 @@
namespace mbgl {
namespace android {
-mbgl::LineAnnotation Polyline::toAnnotation(jni::JNIEnv& env, jni::Object<Polyline> polyline) {
- static auto javaClass = jni::Class<Polyline>::Singleton(env);
+mbgl::LineAnnotation Polyline::toAnnotation(jni::JNIEnv& env, const jni::Object<Polyline>& polyline) {
+ static auto& javaClass = jni::Class<Polyline>::Singleton(env);
static auto points = javaClass.GetField<jni::Object<java::util::List>>(env, "points");
static auto alpha = javaClass.GetField<float>(env, "alpha");
static auto color = javaClass.GetField<int>(env, "color");
static auto width = javaClass.GetField<float>(env, "width");
mbgl::LineAnnotation annotation {
- MultiPoint::toGeometry<mbgl::LineString<double>>(env, *jni::SeizeLocal(env, polyline.Get(env, points)))
+ MultiPoint::toGeometry<mbgl::LineString<double>>(env, polyline.Get(env, points))
};
annotation.opacity = polyline.Get(env, alpha);