From 9ed9c8c0a2a91e8218bc32995fa46c37541a4414 Mon Sep 17 00:00:00 2001 From: liwang <965027894@qq.com> Date: Sat, 30 Aug 2025 15:13:58 +0800 Subject: [PATCH] =?UTF-8?q?sts=5Fconvert=5Fother.cpp=E6=96=87=E4=BB=B6GetP?= =?UTF-8?q?ixelMapArrayByRef=E6=97=A5=E5=BF=97=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liwang <965027894@qq.com> --- frameworks/ets/ani/src/sts_convert_other.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frameworks/ets/ani/src/sts_convert_other.cpp b/frameworks/ets/ani/src/sts_convert_other.cpp index 7631b34bd..38630fe3e 100644 --- a/frameworks/ets/ani/src/sts_convert_other.cpp +++ b/frameworks/ets/ani/src/sts_convert_other.cpp @@ -103,22 +103,21 @@ ani_status GetPixelMapArrayByRef(ani_env *env, ani_ref param, std::vectorObject_GetPropertyByName_Int(static_cast(param), "length", &length); if (status != ANI_OK) { - ANS_LOGE("GetPixelMapArrayByRef: status : %{public}d", status); + ANS_LOGE("Object_GetPropertyByName_Int fail. status : %{public}d", status); return status; } - for (int32_t i = 0; i < length; i++) { ani_ref pixelMapRef; status = env->Object_CallMethodByName_Ref(static_cast(param), "$_get", "i:C{std.core.Object}", &pixelMapRef, i); if (status != ANI_OK) { - ANS_LOGE("GetPixelMapArrayByRef:status : %{public}d, index: %{public}d", status, i); + ANS_LOGE("Object_CallMethodByName_Ref fail. status : %{public}d, index: %{public}d", status, i); pixelMaps.clear(); return status; } std::shared_ptr pixelMap = GetPixelMapFromEnvSp(env, static_cast(pixelMapRef)); if (pixelMap == nullptr) { - ANS_LOGE("GetPixelMapArrayByRef: GetPixelMapFromEnvSp failed."); + ANS_LOGE("GetPixelMapFromEnvSp fail. pixelMap nullptr"); pixelMaps.clear(); return ANI_INVALID_ARGS; } -- Gitee