resolve some problem of codecheck

This commit is contained in:
zhangwentao 2024-07-30 17:46:17 +08:00
parent b834722fe3
commit 6bf6d3cf00

View File

@ -712,8 +712,8 @@ napi_value AttachApplicationContext(napi_env env, void* value, void* hint)
return contextObj;
}
void BindPropertiesAndFunctions(napi_env env, napi_value object, const char* moduleName, std::make_unique<JsBaseContext> jsContext){
void BindPropertyAndFunction(napi_env env, napi_value object, const char* moduleName)
{
BindNativeProperty(env, object, "cacheDir", JsBaseContext::GetCacheDir);
BindNativeProperty(env, object, "tempDir", JsBaseContext::GetTempDir);
BindNativeProperty(env, object, "resourceDir", JsBaseContext::GetResourceDir);
@ -770,7 +770,7 @@ napi_value CreateJsBaseContext(napi_env env, std::shared_ptr<Context> context, b
}
const char *moduleName = "JsBaseContext";
BindPropertiesAndFunctions(env, object, moduleName, jsContext);
BindPropertiesAndFunctions(env, object, moduleName);
return object;
}
} // namespace AbilityRuntime