Skip to content

Commit

Permalink
Fixing CI errors
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuguohua committed Nov 18, 2024
1 parent 0d3b3e8 commit e3f27c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion native/cocos/audio/android/AudioMixerController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t>(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.
Expand Down
2 changes: 1 addition & 1 deletion native/cocos/platform/openharmony/napi/NapiHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ static void registerFunction(const Napi::CallbackInfo &info) {
return;
}

std::unordered_map<std::string, JSFunction> JSFunction::FUNCTION_MAP;
std::unordered_map<std::string, JSFunction> JSFunction::jsFunctionMap;

static void napiASend(const Napi::CallbackInfo &info) {
OpenHarmonyPlatform::getInstance()->triggerMessageSignal();
Expand Down
6 changes: 3 additions & 3 deletions native/cocos/platform/openharmony/napi/NapiHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class JSFunction {
char* name = nullptr;

public:
static std::unordered_map<std::string, JSFunction> FUNCTION_MAP;
static std::unordered_map<std::string, JSFunction> jsFunctionMap;

explicit JSFunction(char* name, napi_env env, napi_ref funcRef)
: name(name), env(env), funcRef(funcRef){}
Expand All @@ -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<typename ReturnType, typename... Args>
Expand Down

0 comments on commit e3f27c7

Please sign in to comment.