mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 21:45:36 +00:00
Move local variables in components
This commit is contained in:
parent
6ead5f9321
commit
87c9f395f1
13 changed files with 16 additions and 16 deletions
|
@ -76,7 +76,7 @@ namespace Bsa
|
||||||
fail("Corrupted BSA");
|
fail("Corrupted BSA");
|
||||||
}
|
}
|
||||||
|
|
||||||
mFolders[dirHash][{ nameHash, extHash }] = file;
|
mFolders[dirHash][{ nameHash, extHash }] = std::move(file);
|
||||||
|
|
||||||
FileStruct fileStruct{};
|
FileStruct fileStruct{};
|
||||||
mFiles.push_back(fileStruct);
|
mFiles.push_back(fileStruct);
|
||||||
|
|
|
@ -371,7 +371,7 @@ bool Config::GameSettings::writeFileWithComments(QFile& file)
|
||||||
{
|
{
|
||||||
if ((keyMatch.captured(1) + "=" + keyMatch.captured(2)) == keyVal)
|
if ((keyMatch.captured(1) + "=" + keyMatch.captured(2)) == keyVal)
|
||||||
{
|
{
|
||||||
*iter = settingLine;
|
*iter = std::move(settingLine);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -601,7 +601,7 @@ namespace DetourNavigator
|
||||||
if (mSettings.get().mEnableRecastMeshFileNameRevision)
|
if (mSettings.get().mEnableRecastMeshFileNameRevision)
|
||||||
recastMeshRevision = revision;
|
recastMeshRevision = revision;
|
||||||
if (mSettings.get().mEnableNavMeshFileNameRevision)
|
if (mSettings.get().mEnableNavMeshFileNameRevision)
|
||||||
navMeshRevision = revision;
|
navMeshRevision = std::move(revision);
|
||||||
}
|
}
|
||||||
if (recastMesh && mSettings.get().mEnableWriteRecastMeshToFile)
|
if (recastMesh && mSettings.get().mEnableWriteRecastMeshToFile)
|
||||||
writeToFile(*recastMesh,
|
writeToFile(*recastMesh,
|
||||||
|
|
|
@ -74,7 +74,7 @@ namespace ESM
|
||||||
esm.getHNT(multiplier, "MULT");
|
esm.getHNT(multiplier, "MULT");
|
||||||
params.emplace_back(rand, multiplier);
|
params.emplace_back(rand, multiplier);
|
||||||
}
|
}
|
||||||
mPermanentMagicEffectMagnitudes[id] = params;
|
mPermanentMagicEffectMagnitudes[id] = std::move(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (esm.isNextSub("EQUI"))
|
while (esm.isNextSub("EQUI"))
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace ESM
|
||||||
state.mPurgedEffects.insert(index);
|
state.mPurgedEffects.insert(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
mSpellParams[id] = state;
|
mSpellParams[id] = std::move(state);
|
||||||
mSpells.emplace_back(id);
|
mSpells.emplace_back(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ namespace ESM
|
||||||
esm.getHNT(info.mMagnitude, "MAGN");
|
esm.getHNT(info.mMagnitude, "MAGN");
|
||||||
permEffectList.push_back(info);
|
permEffectList.push_back(info);
|
||||||
}
|
}
|
||||||
mPermanentSpellEffects[spellId] = permEffectList;
|
mPermanentSpellEffects[spellId] = std::move(permEffectList);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Obsolete
|
// Obsolete
|
||||||
|
|
|
@ -50,7 +50,7 @@ void ESM4::Furniture::load(ESM4::Reader& reader)
|
||||||
reader.getLocalizedString(name);
|
reader.getLocalizedString(name);
|
||||||
// FIXME: subsequent FULL subrecords name object combinations (FO4)
|
// FIXME: subsequent FULL subrecords name object combinations (FO4)
|
||||||
if (mFullName.empty())
|
if (mFullName.empty())
|
||||||
mFullName = name;
|
mFullName = std::move(name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ESM4::SUB_MODL:
|
case ESM4::SUB_MODL:
|
||||||
|
|
|
@ -586,7 +586,7 @@ namespace ESMTerrain
|
||||||
Misc::StringUtils::replaceLast(texture_, ".", mNormalHeightMapPattern + ".");
|
Misc::StringUtils::replaceLast(texture_, ".", mNormalHeightMapPattern + ".");
|
||||||
if (mVFS->exists(texture_))
|
if (mVFS->exists(texture_))
|
||||||
{
|
{
|
||||||
info.mNormalMap = texture_;
|
info.mNormalMap = std::move(texture_);
|
||||||
info.mParallax = true;
|
info.mParallax = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -594,7 +594,7 @@ namespace ESMTerrain
|
||||||
texture_ = texture;
|
texture_ = texture;
|
||||||
Misc::StringUtils::replaceLast(texture_, ".", mNormalMapPattern + ".");
|
Misc::StringUtils::replaceLast(texture_, ".", mNormalMapPattern + ".");
|
||||||
if (mVFS->exists(texture_))
|
if (mVFS->exists(texture_))
|
||||||
info.mNormalMap = texture_;
|
info.mNormalMap = std::move(texture_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -604,7 +604,7 @@ namespace ESMTerrain
|
||||||
Misc::StringUtils::replaceLast(texture_, ".", mSpecularMapPattern + ".");
|
Misc::StringUtils::replaceLast(texture_, ".", mSpecularMapPattern + ".");
|
||||||
if (mVFS->exists(texture_))
|
if (mVFS->exists(texture_))
|
||||||
{
|
{
|
||||||
info.mDiffuseMap = texture_;
|
info.mDiffuseMap = std::move(texture_);
|
||||||
info.mSpecular = true;
|
info.mSpecular = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -309,7 +309,7 @@ namespace Files
|
||||||
tempPath /= str.substr(pos + 1, str.length() - pos);
|
tempPath /= str.substr(pos + 1, str.length() - pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
path = tempPath;
|
path = std::move(tempPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,7 +85,7 @@ namespace LuaUtil
|
||||||
|
|
||||||
auto initializer = [](sol::table hiddenData) {
|
auto initializer = [](sol::table hiddenData) {
|
||||||
ScriptId id = hiddenData[ScriptsContainer::sScriptIdKey];
|
ScriptId id = hiddenData[ScriptsContainer::sScriptIdKey];
|
||||||
return AsyncPackageId{ id.mContainer, id.mIndex, hiddenData };
|
return AsyncPackageId{ id.mContainer, id.mIndex, std::move(hiddenData) };
|
||||||
};
|
};
|
||||||
return sol::make_object(lua, initializer);
|
return sol::make_object(lua, initializer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace LuaUi
|
||||||
if (typeField != sol::nil && templateType != type)
|
if (typeField != sol::nil && templateType != type)
|
||||||
throw std::logic_error(std::string("Template layout type ") + type
|
throw std::logic_error(std::string("Template layout type ") + type
|
||||||
+ std::string(" doesn't match template type ") + templateType);
|
+ std::string(" doesn't match template type ") + templateType);
|
||||||
type = templateType;
|
type = std::move(templateType);
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace LuaUi
|
||||||
Log(Debug::Warning) << "A script settings page has an empty name";
|
Log(Debug::Warning) << "A script settings page has an empty name";
|
||||||
if (!element.get())
|
if (!element.get())
|
||||||
Log(Debug::Warning) << "A script settings page has no UI element assigned";
|
Log(Debug::Warning) << "A script settings page has no UI element assigned";
|
||||||
return { std::move(name), std::move(searchHints), element };
|
return { std::move(name), std::move(searchHints), std::move(element) };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -672,7 +672,7 @@ namespace Nif
|
||||||
|
|
||||||
assert(r != nullptr);
|
assert(r != nullptr);
|
||||||
assert(r->recType != RC_MISSING);
|
assert(r->recType != RC_MISSING);
|
||||||
r->recName = rec;
|
r->recName = std::move(rec);
|
||||||
r->recIndex = i;
|
r->recIndex = i;
|
||||||
r->read(&nif);
|
r->read(&nif);
|
||||||
mRecords[i] = std::move(r);
|
mRecords[i] = std::move(r);
|
||||||
|
|
|
@ -77,7 +77,7 @@ void Settings::SettingsFileParser::loadSettingsFile(
|
||||||
Misc::StringUtils::trim(value);
|
Misc::StringUtils::trim(value);
|
||||||
|
|
||||||
if (overrideExisting)
|
if (overrideExisting)
|
||||||
settings[std::make_pair(currentCategory, setting)] = value;
|
settings[std::make_pair(currentCategory, setting)] = std::move(value);
|
||||||
else if (settings.insert(std::make_pair(std::make_pair(currentCategory, setting), value)).second == false)
|
else if (settings.insert(std::make_pair(std::make_pair(currentCategory, setting), value)).second == false)
|
||||||
fail(std::string("duplicate setting: [" + currentCategory + "] " + setting));
|
fail(std::string("duplicate setting: [" + currentCategory + "] " + setting));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue