mirror of
https://gitee.com/openharmony/distributeddatamgr_file
synced 2024-11-27 01:00:49 +00:00
修改代码规范
Signed-off-by: cwx1101045 <chenkai154@huawei.com>
This commit is contained in:
parent
9e17f8945b
commit
84a7f0a06b
1
LICENSE
1
LICENSE
@ -1,4 +1,3 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
@ -91,7 +91,7 @@ NVal NAsyncWorkCallback::Schedule(string procedureName, NContextCBExec cbExec, N
|
||||
return NVal();
|
||||
}
|
||||
|
||||
ctx_ = nullptr; // The ownership of ctx_ has been transfered
|
||||
ctx_ = nullptr; // The ownership of ctx_ has been transferred
|
||||
return NVal::CreateUndefined(env_);
|
||||
}
|
||||
} // namespace DistributedFS
|
||||
|
@ -69,7 +69,7 @@ bool NClass::SaveClass(napi_env env, string className, napi_value exClass)
|
||||
return res == napi_ok;
|
||||
}
|
||||
|
||||
napi_value NClass::InstantiateClass(napi_env env, string className, vector<napi_value> args)
|
||||
napi_value NClass::InstantiateClass(napi_env env, string& className, vector<napi_value>& args)
|
||||
{
|
||||
NClass &nClass = NClass::GetInstance();
|
||||
lock_guard(nClass.exClassMapLock);
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
napi_callback constructor,
|
||||
std::vector<napi_property_descriptor> &&properties);
|
||||
static bool SaveClass(napi_env env, std::string className, napi_value exClass);
|
||||
static napi_value InstantiateClass(napi_env env, std::string className, std::vector<napi_value> args);
|
||||
static napi_value InstantiateClass(napi_env env, std::string& className, std::vector<napi_value>& args);
|
||||
|
||||
template <class T> static T *GetEntityOf(napi_env env, napi_value objStat)
|
||||
{
|
||||
|
@ -188,7 +188,9 @@ bool GetFileNames(string path, vector<string> &filenames, bool rec, bool isList)
|
||||
if (isList) {
|
||||
filenames.push_back(path + "/" + ptr->d_name);
|
||||
} else if (ptr->d_type == DT_DIR && rec) {
|
||||
GetFileNames(path + "/" + ptr->d_name, filenames, rec, isList);
|
||||
if(GetFileNames(path + "/" + ptr->d_name, filenames, rec, isList) == false) {
|
||||
break;
|
||||
}
|
||||
} else if (ptr->d_type == DT_REG) {
|
||||
filenames.push_back(path + "/" + ptr->d_name);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ NVal NAsyncWorkCallback::Schedule(string procedureName, NContextCBExec cbExec, N
|
||||
return NVal();
|
||||
}
|
||||
|
||||
ctx_ = nullptr; // The ownership of ctx_ has been transfered
|
||||
ctx_ = nullptr; // The ownership of ctx_ has been transferred
|
||||
return NVal::CreateUndefined(env_);
|
||||
}
|
||||
} // namespace LibN
|
||||
|
@ -85,7 +85,7 @@ NVal NAsyncWorkPromise::Schedule(string procedureName, NContextCBExec cbExec, NC
|
||||
return NVal();
|
||||
}
|
||||
|
||||
ctx_ = nullptr; // The ownership of ctx_ has been transfered
|
||||
ctx_ = nullptr; // The ownership of ctx_ has been transferred
|
||||
return {env_, result};
|
||||
}
|
||||
} // namespace LibN
|
||||
|
Loading…
Reference in New Issue
Block a user