summaryrefslogtreecommitdiff
path: root/platform/android/src/geojson/polygon.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/geojson/polygon.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/geojson/polygon.cpp')
-rw-r--r--platform/android/src/geojson/polygon.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/platform/android/src/geojson/polygon.cpp b/platform/android/src/geojson/polygon.cpp
index add843e294..4437d134a8 100644
--- a/platform/android/src/geojson/polygon.cpp
+++ b/platform/android/src/geojson/polygon.cpp
@@ -8,24 +8,24 @@ namespace mbgl {
namespace android {
namespace geojson {
-jni::Object<Polygon> Polygon::New(jni::JNIEnv& env, const mbgl::Polygon<double>& polygon) {
- static auto javaClass = jni::Class<Polygon>::Singleton(env);
+jni::Local<jni::Object<Polygon>> Polygon::New(jni::JNIEnv& env, const mbgl::Polygon<double>& polygon) {
+ static auto& javaClass = jni::Class<Polygon>::Singleton(env);
static auto method = javaClass.GetStaticMethod<jni::Object<Polygon> (jni::Object<java::util::List>)>(env, "fromLngLats");
- return javaClass.Call(env, method, *jni::SeizeLocal(env, asPointsListsList(env, polygon)));
+ return javaClass.Call(env, method, asPointsListsList(env, polygon));
}
-mapbox::geojson::polygon Polygon::convert(jni::JNIEnv &env, jni::Object<Polygon> jPolygon) {
+mapbox::geojson::polygon Polygon::convert(jni::JNIEnv &env, const jni::Object<Polygon>& jPolygon) {
mapbox::geojson::polygon polygon;
if (jPolygon) {
- polygon = Polygon::convert(env, *jni::SeizeLocal(env, Polygon::coordinates(env, jPolygon)));
+ polygon = Polygon::convert(env, Polygon::coordinates(env, jPolygon));
}
return polygon;
}
-mapbox::geojson::polygon Polygon::convert(jni::JNIEnv &env, jni::Object<java::util::List/*<java::util::List<Point>>*/> jPointListsList) {
+mapbox::geojson::polygon Polygon::convert(jni::JNIEnv &env, const jni::Object<java::util::List/*<java::util::List<Point>>*/>& jPointListsList) {
mapbox::geojson::polygon polygon;
if (jPointListsList) {
@@ -40,8 +40,8 @@ mapbox::geojson::polygon Polygon::convert(jni::JNIEnv &env, jni::Object<java::ut
}
-jni::Object<java::util::List> Polygon::coordinates(jni::JNIEnv &env, jni::Object<Polygon> jPolygon) {
- static auto javaClass = jni::Class<Polygon>::Singleton(env);
+jni::Local<jni::Object<java::util::List>> Polygon::coordinates(jni::JNIEnv &env, const jni::Object<Polygon>& jPolygon) {
+ static auto& javaClass = jni::Class<Polygon>::Singleton(env);
static auto method = javaClass.GetMethod<jni::Object<java::util::List> ()>(env, "coordinates");
return jPolygon.Call(env, method);
}