mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 15:36:42 +00:00
Avoid making string copies instead of references
This commit is contained in:
parent
4cb4f82431
commit
6d48d9329e
1 changed files with 3 additions and 3 deletions
|
@ -129,7 +129,7 @@ namespace MWMechanics
|
|||
npcStats.getSkill (i).setBase (5 + bonus);
|
||||
}
|
||||
|
||||
for (const std::string power : race->mPowers.mList)
|
||||
for (const std::string &power : race->mPowers.mList)
|
||||
{
|
||||
creatureStats.getSpells().add(power);
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ namespace MWMechanics
|
|||
const ESM::BirthSign *sign =
|
||||
esmStore.get<ESM::BirthSign>().find(signId);
|
||||
|
||||
for (const std::string power : sign->mPowers.mList)
|
||||
for (const std::string &power : sign->mPowers.mList)
|
||||
{
|
||||
creatureStats.getSpells().add(power);
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ namespace MWMechanics
|
|||
|
||||
std::vector<std::string> selectedSpells = autoCalcPlayerSpells(skills, attributes, race);
|
||||
|
||||
for (const std::string spell : selectedSpells)
|
||||
for (const std::string &spell : selectedSpells)
|
||||
creatureStats.getSpells().add(spell);
|
||||
|
||||
// forced update and current value adjustments
|
||||
|
|
Loading…
Reference in a new issue