mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-18 08:56:10 -04:00
use <<
This commit is contained in:
parent
a5580718f7
commit
2dc0d8abca
@ -1238,7 +1238,7 @@ namespace MWScript
|
||||
std::map<ESM::RefId, std::shared_ptr<GlobalScriptDesc>> globalScripts(scripts.begin(), scripts.end());
|
||||
|
||||
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());
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
{
|
||||
@ -1253,19 +1253,18 @@ namespace MWScript
|
||||
if (!script->mRunning)
|
||||
continue;
|
||||
|
||||
const std::string scptName = refId.serializeText();
|
||||
const Compiler::Locals& complocals
|
||||
= MWBase::Environment::get().getScriptManager()->getLocals(refId);
|
||||
const Locals& locals
|
||||
= MWBase::Environment::get().getScriptManager()->getGlobalScripts().getLocals(refId);
|
||||
|
||||
if (locals.isEmpty())
|
||||
str << std::endl << " No variables in script " << scptName;
|
||||
str << std::endl << " No variables in script " << refId;
|
||||
else
|
||||
{
|
||||
printVariables(scptName, complocals.get('s'), locals.mShorts, "short");
|
||||
printVariables(scptName, complocals.get('l'), locals.mLongs, "long");
|
||||
printVariables(scptName, complocals.get('f'), locals.mFloats, "float");
|
||||
printVariables(refId, complocals.get('s'), locals.mShorts, "short");
|
||||
printVariables(refId, complocals.get('l'), locals.mLongs, "long");
|
||||
printVariables(refId, complocals.get('f'), locals.mFloats, "float");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user