From 714f6122e922da49bcaf91aaa88753ce19fc76f3 Mon Sep 17 00:00:00 2001 From: acy Date: Tue, 15 Apr 2025 18:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id78eaf920b66efbf367e72144e6337a1ddc3a5ae Signed-off-by: acy --- frameworks/ani/input_consumer/src/input_consumer.cpp | 2 +- frameworks/ani/input_device/src/ani_input_device_context.cpp | 4 ++-- frameworks/ani/pointer/src/pointer.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frameworks/ani/input_consumer/src/input_consumer.cpp b/frameworks/ani/input_consumer/src/input_consumer.cpp index 1bd3174fbc..1e4fa3b165 100644 --- a/frameworks/ani/input_consumer/src/input_consumer.cpp +++ b/frameworks/ani/input_consumer/src/input_consumer.cpp @@ -35,7 +35,7 @@ const double INT32_MAX_D = static_cast(std::numeric_limits::max } // namespace static Callbacks callbacks = {}; -std::mutex sCallBacksMutex; +static std::mutex sCallBacksMutex; KeyEventMonitorInfo::~KeyEventMonitorInfo() { diff --git a/frameworks/ani/input_device/src/ani_input_device_context.cpp b/frameworks/ani/input_device/src/ani_input_device_context.cpp index 40a641c7e4..4e430ecfc6 100644 --- a/frameworks/ani/input_device/src/ani_input_device_context.cpp +++ b/frameworks/ani/input_device/src/ani_input_device_context.cpp @@ -36,7 +36,7 @@ using namespace OHOS::MMI; -std::unordered_map axisType = { +static std::unordered_map axisType = { { ABS_MT_TOUCH_MAJOR, "touchmajor" }, { ABS_MT_TOUCH_MINOR, "touchminor" }, { ABS_MT_ORIENTATION, "orientation" }, { ABS_MT_POSITION_X, "x" }, { ABS_MT_POSITION_Y, "y" }, { ABS_MT_PRESSURE, "pressure" }, { ABS_MT_WIDTH_MAJOR, "toolmajor" }, { ABS_MT_WIDTH_MINOR, "toolminor" }, @@ -47,7 +47,7 @@ constexpr uint32_t EVDEV_UDEV_TAG_TOUCHSCREEN = (1 << 4); constexpr uint32_t EVDEV_UDEV_TAG_JOYSTICK = (1 << 6); constexpr uint32_t EVDEV_UDEV_TAG_TRACKBALL = (1 << 10); -AniUtil::DeviceType g_deviceType[] = { +static AniUtil::DeviceType g_deviceType[] = { { "keyboard", EVDEV_UDEV_TAG_KEYBOARD }, { "mouse", EVDEV_UDEV_TAG_MOUSE }, { "touchpad", EVDEV_UDEV_TAG_TOUCHPAD }, diff --git a/frameworks/ani/pointer/src/pointer.cpp b/frameworks/ani/pointer/src/pointer.cpp index 4c6cca56ea..7f2bca2f8a 100644 --- a/frameworks/ani/pointer/src/pointer.cpp +++ b/frameworks/ani/pointer/src/pointer.cpp @@ -66,7 +66,7 @@ static ani_error CreateAniError(ani_env *env, std::string&& errMsg) return static_cast(errorObject); } -int32_t ToInt32ECMAScript(double value) +static int32_t ToInt32ECMAScript(double value) { if (std::isnan(value) || std::isinf(value)) { return 0; -- Gitee