mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-17 16:16:34 +00:00
use <<
This commit is contained in:
parent
a5580718f7
commit
2dc0d8abca
1 changed files with 5 additions and 6 deletions
|
@ -1238,7 +1238,7 @@ namespace MWScript
|
||||||
std::map<ESM::RefId, std::shared_ptr<GlobalScriptDesc>> globalScripts(scripts.begin(), scripts.end());
|
std::map<ESM::RefId, std::shared_ptr<GlobalScriptDesc>> globalScripts(scripts.begin(), scripts.end());
|
||||||
|
|
||||||
auto printVariables
|
auto printVariables
|
||||||
= [&str](std::string_view scptName, const auto& names, const auto& values, std::string_view type) {
|
= [&str](const ESM::RefId& scptName, const auto& names, const auto& values, std::string_view type) {
|
||||||
size_t size = std::min(names.size(), values.size());
|
size_t size = std::min(names.size(), values.size());
|
||||||
for (size_t i = 0; i < size; ++i)
|
for (size_t i = 0; i < size; ++i)
|
||||||
{
|
{
|
||||||
|
@ -1253,19 +1253,18 @@ namespace MWScript
|
||||||
if (!script->mRunning)
|
if (!script->mRunning)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const std::string scptName = refId.serializeText();
|
|
||||||
const Compiler::Locals& complocals
|
const Compiler::Locals& complocals
|
||||||
= MWBase::Environment::get().getScriptManager()->getLocals(refId);
|
= MWBase::Environment::get().getScriptManager()->getLocals(refId);
|
||||||
const Locals& locals
|
const Locals& locals
|
||||||
= MWBase::Environment::get().getScriptManager()->getGlobalScripts().getLocals(refId);
|
= MWBase::Environment::get().getScriptManager()->getGlobalScripts().getLocals(refId);
|
||||||
|
|
||||||
if (locals.isEmpty())
|
if (locals.isEmpty())
|
||||||
str << std::endl << " No variables in script " << scptName;
|
str << std::endl << " No variables in script " << refId;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printVariables(scptName, complocals.get('s'), locals.mShorts, "short");
|
printVariables(refId, complocals.get('s'), locals.mShorts, "short");
|
||||||
printVariables(scptName, complocals.get('l'), locals.mLongs, "long");
|
printVariables(refId, complocals.get('l'), locals.mLongs, "long");
|
||||||
printVariables(scptName, complocals.get('f'), locals.mFloats, "float");
|
printVariables(refId, complocals.get('f'), locals.mFloats, "float");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue