diff --git a/native/cocos/audio/android/AudioMixerController.cpp b/native/cocos/audio/android/AudioMixerController.cpp index 2c11fc2849c..8307aa682be 100644 --- a/native/cocos/audio/android/AudioMixerController.cpp +++ b/native/cocos/audio/android/AudioMixerController.cpp @@ -37,7 +37,7 @@ namespace cc { AudioMixerController::AudioMixerController(int bufferSizeInFrames, int sampleRate, int channelCount) : _bufferSizeInFrames(bufferSizeInFrames), _sampleRate(sampleRate), _channelCount(channelCount), _mixer(nullptr), _isPaused(false), _isMixingFrame(false) { ALOGV("In the constructor of AudioMixerController!"); - + // NOLINTNEXTLINE(bugprone-misplaced-widening-cast) _mixingBuffer.size = static_cast(bufferSizeInFrames * 2 * channelCount); // Don't use posix_memalign since it was added from API 16, it will crash on Android 2.3 // Therefore, for a workaround, we uses memalign here. diff --git a/native/cocos/platform/openharmony/napi/NapiHelper.cpp b/native/cocos/platform/openharmony/napi/NapiHelper.cpp index bd55b6c8fd8..8099b517b16 100644 --- a/native/cocos/platform/openharmony/napi/NapiHelper.cpp +++ b/native/cocos/platform/openharmony/napi/NapiHelper.cpp @@ -282,7 +282,7 @@ static void registerFunction(const Napi::CallbackInfo &info) { return; } -std::unordered_map JSFunction::FUNCTION_MAP; +std::unordered_map JSFunction::jsFunctionMap; static void napiASend(const Napi::CallbackInfo &info) { OpenHarmonyPlatform::getInstance()->triggerMessageSignal(); diff --git a/native/cocos/platform/openharmony/napi/NapiHelper.h b/native/cocos/platform/openharmony/napi/NapiHelper.h index 951fcfe8692..dde84568f5e 100644 --- a/native/cocos/platform/openharmony/napi/NapiHelper.h +++ b/native/cocos/platform/openharmony/napi/NapiHelper.h @@ -59,7 +59,7 @@ class JSFunction { char* name = nullptr; public: - static std::unordered_map FUNCTION_MAP; + static std::unordered_map jsFunctionMap; explicit JSFunction(char* name, napi_env env, napi_ref funcRef) : name(name), env(env), funcRef(funcRef){} @@ -72,11 +72,11 @@ class JSFunction { static JSFunction getFunction(std::string functionName) { - return FUNCTION_MAP.at(functionName); + return jsFunctionMap.at(functionName); } static void addFunction(std::string name, JSFunction* jsFunction) { - FUNCTION_MAP.emplace(name, *jsFunction); + jsFunctionMap.emplace(name, *jsFunction); } template