diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-08-22 12:27:43 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2018-09-06 17:26:28 -0700 |
commit | 9cd50a891dbd320e9e4816eef4545e0a41f9ab32 (patch) | |
tree | b424e2dcee3090d9c3f37864112d19799dd9af35 /platform/android/src/graphics/pointf.cpp | |
parent | 70a204924552463eaeca975a5dd28c00b21aa53d (diff) | |
download | qtlocation-mapboxgl-upstream/jni.hpp-4.tar.gz |
[android] jni.hpp 4.0.0upstream/jni.hpp-4
Diffstat (limited to 'platform/android/src/graphics/pointf.cpp')
-rw-r--r-- | platform/android/src/graphics/pointf.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/android/src/graphics/pointf.cpp b/platform/android/src/graphics/pointf.cpp index eceb65b07a..2fc762d6e9 100644 --- a/platform/android/src/graphics/pointf.cpp +++ b/platform/android/src/graphics/pointf.cpp @@ -4,14 +4,14 @@ namespace mbgl { namespace android { -jni::Object<PointF> PointF::New(jni::JNIEnv& env, float x, float y) { - static auto javaClass = jni::Class<PointF>::Singleton(env); +jni::Local<jni::Object<PointF>> PointF::New(jni::JNIEnv& env, float x, float y) { + static auto& javaClass = jni::Class<PointF>::Singleton(env); static auto constructor = javaClass.GetConstructor<float, float>(env); return javaClass.New(env, constructor, x, y); } -mbgl::ScreenCoordinate PointF::getScreenCoordinate(jni::JNIEnv& env, jni::Object<PointF> point) { - static auto javaClass = jni::Class<PointF>::Singleton(env); +mbgl::ScreenCoordinate PointF::getScreenCoordinate(jni::JNIEnv& env, const jni::Object<PointF>& point) { + static auto& javaClass = jni::Class<PointF>::Singleton(env); static auto xField = javaClass.GetField<jni::jfloat>(env, "x"); static auto yField = javaClass.GetField<jni::jfloat>(env, "y"); return mbgl::ScreenCoordinate{point.Get(env, xField), point.Get(env, yField)}; |