summaryrefslogtreecommitdiff
path: root/platform/android/jni_utils.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-31 23:48:16 +0200
committerGitHub <noreply@github.com>2022-05-31 23:48:16 +0200
commitb777454097701595cb22a9e9249f76bec0e850d0 (patch)
tree4eacd63e1e5ab94b857050aa75e4e1d30604bb4d /platform/android/jni_utils.cpp
parentd8b0a8cd29c1f67fe850d0df0ca09ffb4d73fe10 (diff)
parent2afef001e702046378a02fa887dbb361f39c7b6e (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.cpp10
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);