summaryrefslogtreecommitdiff
path: root/platform/android/src/style/position.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/style/position.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/style/position.cpp')
-rw-r--r--platform/android/src/style/position.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/platform/android/src/style/position.cpp b/platform/android/src/style/position.cpp
index c6918a2e9a..20a0c47dff 100644
--- a/platform/android/src/style/position.cpp
+++ b/platform/android/src/style/position.cpp
@@ -3,8 +3,8 @@
namespace mbgl {
namespace android {
-jni::Object<Position> Position::fromPosition(jni::JNIEnv& env, jfloat radialCoordinate, jfloat azimuthalAngle, jfloat polarAngle) {
- static auto javaClass = jni::Class<Position>::Singleton(env);
+jni::Local<jni::Object<Position>> Position::fromPosition(jni::JNIEnv& env, jfloat radialCoordinate, jfloat azimuthalAngle, jfloat polarAngle) {
+ static auto& javaClass = jni::Class<Position>::Singleton(env);
static auto method = javaClass.GetStaticMethod<jni::Object<Position> (jfloat, jfloat, jfloat)>(env, "fromPosition");
return javaClass.Call(env, method, radialCoordinate, azimuthalAngle, polarAngle);
}
@@ -13,20 +13,20 @@ void Position::registerNative(jni::JNIEnv& env) {
jni::Class<Position>::Singleton(env);
}
-float Position::getRadialCoordinate(jni::JNIEnv& env, jni::Object<Position> position){
- static auto javaClass = jni::Class<Position>::Singleton(env);
+float Position::getRadialCoordinate(jni::JNIEnv& env, const jni::Object<Position>& position) {
+ static auto& javaClass = jni::Class<Position>::Singleton(env);
static auto field = javaClass.GetField<jfloat>(env, "radialCoordinate");
return position.Get(env, field);
}
-float Position::getAzimuthalAngle(jni::JNIEnv& env, jni::Object<Position> position){
- static auto javaClass = jni::Class<Position>::Singleton(env);
+float Position::getAzimuthalAngle(jni::JNIEnv& env, const jni::Object<Position>& position) {
+ static auto& javaClass = jni::Class<Position>::Singleton(env);
static auto field = javaClass.GetField<jfloat>(env, "azimuthalAngle");
return position.Get(env, field);
}
-float Position::getPolarAngle(jni::JNIEnv& env, jni::Object<Position> position){
- static auto javaClass = jni::Class<Position>::Singleton(env);
+float Position::getPolarAngle(jni::JNIEnv& env, const jni::Object<Position>& position) {
+ static auto& javaClass = jni::Class<Position>::Singleton(env);
static auto field = javaClass.GetField<jfloat>(env, "polarAngle");
return position.Get(env, field);
}