diff options
-rw-r--r-- | platform/android/jni_utils.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/platform/android/jni_utils.cpp b/platform/android/jni_utils.cpp index d46b4f39de..2b0ee50570 100644 --- a/platform/android/jni_utils.cpp +++ b/platform/android/jni_utils.cpp @@ -265,33 +265,33 @@ Variant _jobject_to_variant(JNIEnv *env, jobject obj) { if (name == "[D") { jdoubleArray arr = (jdoubleArray)obj; int fCount = env->GetArrayLength(arr); - PackedFloat32Array sarr; - sarr.resize(fCount); + PackedFloat64Array packed_array; + packed_array.resize(fCount); - real_t *w = sarr.ptrw(); + double *w = packed_array.ptrw(); for (int i = 0; i < fCount; i++) { double n; env->GetDoubleArrayRegion(arr, i, 1, &n); w[i] = n; } - return sarr; + return packed_array; } if (name == "[F") { jfloatArray arr = (jfloatArray)obj; int fCount = env->GetArrayLength(arr); - PackedFloat32Array sarr; - sarr.resize(fCount); + PackedFloat32Array packed_array; + packed_array.resize(fCount); - real_t *w = sarr.ptrw(); + float *w = packed_array.ptrw(); for (int i = 0; i < fCount; i++) { float n; env->GetFloatArrayRegion(arr, i, 1, &n); w[i] = n; } - return sarr; + return packed_array; } if (name == "[Ljava.lang.Object;") { |