summaryrefslogtreecommitdiffstats
path: root/platform/android/jni_utils.cpp
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2022-05-30 22:13:49 +0100
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2022-05-31 17:11:05 +0100
commit2afef001e702046378a02fa887dbb361f39c7b6e (patch)
tree2dac64b759e489b32055ce95608d1783c1f805c7 /platform/android/jni_utils.cpp
parenta837accc5d058e4eec29f4d854da8cb9f55a97cf (diff)
downloadredot-engine-2afef001e702046378a02fa887dbb361f39c7b6e.tar.gz
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);