mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:23:51 +00:00
Use auto for map value_type in range-based for loops
To avoid implicit call of copy constructor for pair<const K, V> to pair<K, V> conversion.
This commit is contained in:
parent
5e12073b47
commit
fa7b304e78
4 changed files with 8 additions and 8 deletions
|
@ -739,7 +739,7 @@ void Record<ESM::Faction>::print()
|
||||||
std::cout << " Faction Reaction: "
|
std::cout << " Faction Reaction: "
|
||||||
<< mData.mData.mRankData[i].mFactReaction << std::endl;
|
<< mData.mData.mRankData[i].mFactReaction << std::endl;
|
||||||
}
|
}
|
||||||
for (const std::pair<std::string, int> &reaction : mData.mReactions)
|
for (const auto &reaction : mData.mReactions)
|
||||||
std::cout << " Reaction: " << reaction.second << " = " << reaction.first << std::endl;
|
std::cout << " Reaction: " << reaction.second << " = " << reaction.first << std::endl;
|
||||||
std::cout << " Deleted: " << mIsDeleted << std::endl;
|
std::cout << " Deleted: " << mIsDeleted << std::endl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1006,7 +1006,7 @@ void CSMWorld::Data::loadFallbackEntries()
|
||||||
std::make_pair("PrisonMarker", "marker_prison.nif")
|
std::make_pair("PrisonMarker", "marker_prison.nif")
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const std::pair<std::string, std::string> &marker : staticMarkers)
|
for (const auto &marker : staticMarkers)
|
||||||
{
|
{
|
||||||
if (mReferenceables.searchId (marker.first)==-1)
|
if (mReferenceables.searchId (marker.first)==-1)
|
||||||
{
|
{
|
||||||
|
@ -1020,7 +1020,7 @@ void CSMWorld::Data::loadFallbackEntries()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const std::pair<std::string, std::string> &marker : doorMarkers)
|
for (const auto &marker : doorMarkers)
|
||||||
{
|
{
|
||||||
if (mReferenceables.searchId (marker.first)==-1)
|
if (mReferenceables.searchId (marker.first)==-1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -790,7 +790,7 @@ bool NpcAnimation::addOrReplaceIndividualPart(ESM::PartReferenceType type, int g
|
||||||
osg::Object* obj = node->getUserDataContainer()->getUserObject(i);
|
osg::Object* obj = node->getUserDataContainer()->getUserObject(i);
|
||||||
if (NifOsg::TextKeyMapHolder* keys = dynamic_cast<NifOsg::TextKeyMapHolder*>(obj))
|
if (NifOsg::TextKeyMapHolder* keys = dynamic_cast<NifOsg::TextKeyMapHolder*>(obj))
|
||||||
{
|
{
|
||||||
for (const std::pair<float, std::string> &key : keys->mTextKeys)
|
for (const auto &key : keys->mTextKeys)
|
||||||
{
|
{
|
||||||
if (Misc::StringUtils::ciEqual(key.second, "talk: start"))
|
if (Misc::StringUtils::ciEqual(key.second, "talk: start"))
|
||||||
mHeadAnimationTime->setTalkStart(key.first);
|
mHeadAnimationTime->setTalkStart(key.first);
|
||||||
|
|
|
@ -470,7 +470,7 @@ namespace MWWorld
|
||||||
gmst["iWereWolfBounty"] = ESM::Variant(1000);
|
gmst["iWereWolfBounty"] = ESM::Variant(1000);
|
||||||
gmst["fCombatDistanceWerewolfMod"] = ESM::Variant(0.3f);
|
gmst["fCombatDistanceWerewolfMod"] = ESM::Variant(0.3f);
|
||||||
|
|
||||||
for (const std::pair<std::string, ESM::Variant> ¶ms : gmst)
|
for (const auto ¶ms : gmst)
|
||||||
{
|
{
|
||||||
if (!mStore.get<ESM::GameSetting>().search(params.first))
|
if (!mStore.get<ESM::GameSetting>().search(params.first))
|
||||||
{
|
{
|
||||||
|
@ -500,7 +500,7 @@ namespace MWWorld
|
||||||
globals["crimegoldturnin"] = ESM::Variant(0);
|
globals["crimegoldturnin"] = ESM::Variant(0);
|
||||||
globals["pchasturnin"] = ESM::Variant(0);
|
globals["pchasturnin"] = ESM::Variant(0);
|
||||||
|
|
||||||
for (const std::pair<std::string, ESM::Variant> ¶ms : globals)
|
for (const auto ¶ms : globals)
|
||||||
{
|
{
|
||||||
if (!mStore.get<ESM::Global>().search(params.first))
|
if (!mStore.get<ESM::Global>().search(params.first))
|
||||||
{
|
{
|
||||||
|
@ -519,7 +519,7 @@ namespace MWWorld
|
||||||
statics["templemarker"] = "marker_temple.nif";
|
statics["templemarker"] = "marker_temple.nif";
|
||||||
statics["travelmarker"] = "marker_travel.nif";
|
statics["travelmarker"] = "marker_travel.nif";
|
||||||
|
|
||||||
for (const std::pair<std::string, std::string> ¶ms : statics)
|
for (const auto ¶ms : statics)
|
||||||
{
|
{
|
||||||
if (!mStore.get<ESM::Static>().search(params.first))
|
if (!mStore.get<ESM::Static>().search(params.first))
|
||||||
{
|
{
|
||||||
|
@ -533,7 +533,7 @@ namespace MWWorld
|
||||||
std::map<std::string, std::string> doors;
|
std::map<std::string, std::string> doors;
|
||||||
doors["prisonmarker"] = "marker_prison.nif";
|
doors["prisonmarker"] = "marker_prison.nif";
|
||||||
|
|
||||||
for (const std::pair<std::string, std::string> ¶ms : doors)
|
for (const auto ¶ms : doors)
|
||||||
{
|
{
|
||||||
if (!mStore.get<ESM::Door>().search(params.first))
|
if (!mStore.get<ESM::Door>().search(params.first))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue