diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-31 23:48:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-31 23:48:16 +0200 |
commit | b777454097701595cb22a9e9249f76bec0e850d0 (patch) | |
tree | 4eacd63e1e5ab94b857050aa75e4e1d30604bb4d /platform/android/jni_utils.cpp | |
parent | d8b0a8cd29c1f67fe850d0df0ca09ffb4d73fe10 (diff) | |
parent | 2afef001e702046378a02fa887dbb361f39c7b6e (diff) |
Merge pull request #61573 from madmiraal/android-cleanup
Cleanup Android C++ code
Diffstat (limited to 'platform/android/jni_utils.cpp')
-rw-r--r-- | platform/android/jni_utils.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/android/jni_utils.cpp b/platform/android/jni_utils.cpp index e2573d10f8..193ef61264 100644 --- a/platform/android/jni_utils.cpp +++ b/platform/android/jni_utils.cpp @@ -123,10 +123,10 @@ jvalret _variant_to_jvalue(JNIEnv *env, Variant::Type p_type, const Variant *p_a for (int j = 0; j < keys.size(); j++) { Variant var = dict[keys[j]]; - jvalret v = _variant_to_jvalue(env, var.get_type(), &var, true); - env->SetObjectArrayElement(jvalues, j, v.val.l); - if (v.obj) { - env->DeleteLocalRef(v.obj); + jvalret valret = _variant_to_jvalue(env, var.get_type(), &var, true); + env->SetObjectArrayElement(jvalues, j, valret.val.l); + if (valret.obj) { + env->DeleteLocalRef(valret.obj); } } @@ -186,7 +186,7 @@ String _get_class_name(JNIEnv *env, jclass cls, bool *array) { if (array) { jmethodID isArray = env->GetMethodID(cclass, "isArray", "()Z"); jboolean isarr = env->CallBooleanMethod(cls, isArray); - (*array) = isarr ? true : false; + (*array) = isarr != 0; } String name = jstring_to_string(clsName, env); env->DeleteLocalRef(clsName); |