Apply clang-format to code base

This commit is contained in:
clang-format-bot 2022-09-22 21:26:05 +03:00 committed by ζeh Matt
parent f37d0be806
commit ddb0522bbf
No known key found for this signature in database
GPG key ID: 18CE582C71A225B0
2199 changed files with 118692 additions and 114392 deletions

View file

@ -94,8 +94,7 @@ void ESM::LuaScriptsCfg::load(ESMReader& esm)
void ESM::LuaScriptsCfg::adjustRefNums(const ESMReader& esm)
{
auto adjustRefNumFn = [&esm](int contentFile) -> int
{
auto adjustRefNumFn = [&esm](int contentFile) -> int {
if (contentFile == 0)
return esm.getIndex();
else if (contentFile > 0 && contentFile <= static_cast<int>(esm.getParentFileIndices().size()))
@ -107,8 +106,7 @@ void ESM::LuaScriptsCfg::adjustRefNums(const ESMReader& esm)
lua_State* L = luaL_newstate();
LuaUtil::BasicSerializer serializer(adjustRefNumFn);
auto adjustLuaData = [&](std::string& data)
{
auto adjustLuaData = [&](std::string& data) {
if (data.empty())
return;
sol::object luaData = LuaUtil::deserialize(L, data, &serializer);
@ -177,7 +175,7 @@ void ESM::LuaScripts::load(ESMReader& esm)
timer.mCallbackArgument = loadLuaBinaryData(esm);
timers.push_back(std::move(timer));
}
mScripts.push_back({std::move(name), std::move(data), std::move(timers)});
mScripts.push_back({ std::move(name), std::move(data), std::move(timers) });
}
}
@ -196,7 +194,6 @@ void ESM::LuaScripts::save(ESMWriter& esm) const
esm.writeHNString("LUAC", timer.mCallbackName);
if (!timer.mCallbackArgument.empty())
saveLuaBinaryData(esm, timer.mCallbackArgument);
}
}
}