From 4cece1209bb72420b9e2a9c83ff735f8fe1bae9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=AD=A3=E7=9A=93?= Date: Mon, 9 Jun 2025 16:44:09 +0800 Subject: [PATCH] refector(photoOutputNapi): Code specification rectification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 叶正皓 --- frameworks/js/camera_napi/src/output/photo_output_napi.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frameworks/js/camera_napi/src/output/photo_output_napi.cpp b/frameworks/js/camera_napi/src/output/photo_output_napi.cpp index d6b7fbd52..2027ba44c 100644 --- a/frameworks/js/camera_napi/src/output/photo_output_napi.cpp +++ b/frameworks/js/camera_napi/src/output/photo_output_napi.cpp @@ -670,7 +670,8 @@ void PhotoListener::OnBufferAvailable() void FillNapiObjectWithCaptureId(napi_env env, int32_t captureId, napi_value &photoAsset) { - napi_value propertyName, propertyValue; + napi_value propertyName; + napi_value propertyValue; napi_create_string_utf8(env, "captureId", NAPI_AUTO_LENGTH, &propertyName); napi_create_int32(env, captureId, &propertyValue); napi_set_property(env, photoAsset, propertyName, propertyValue); @@ -1800,7 +1801,8 @@ void FillPixelMapWithCaptureIdAndTimestamp(napi_env env, int32_t captureId, int6 valueType == napi_undefined); return; } - napi_value propertyName, propertyValue; + napi_value propertyName; + napi_value propertyValue; napi_get_undefined(env, &propertyName); napi_get_undefined(env, &propertyValue); napi_create_string_utf8(env, "captureId", NAPI_AUTO_LENGTH, &propertyName); -- Gitee