diff options
author | Andrei Kortunov <andrei.kortunov@yandex.ru> | 2024-02-23 17:02:40 +0400 |
---|---|---|
committer | Andrei Kortunov <andrei.kortunov@yandex.ru> | 2024-02-23 17:02:40 +0400 |
commit | 1126f38a1e7c6b08cf8777ffdcad0c29c0023653 (patch) | |
tree | 4e5201905783a9d12c99dd2f5955db74f3ea827d | |
parent | fc1f2446278516e7936663c470addf5c5abd076c (diff) |
Do not copy the whole attributes store
-rw-r--r-- | apps/openmw/mwlua/stats.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/openmw/mwlua/stats.cpp b/apps/openmw/mwlua/stats.cpp index c6492c1ec2..eaa1f89d97 100644 --- a/apps/openmw/mwlua/stats.cpp +++ b/apps/openmw/mwlua/stats.cpp @@ -476,7 +476,7 @@ namespace MWLua auto skillIncreasesForAttributeStatsT = context.mLua->sol().new_usertype<SkillIncreasesForAttributeStats>("SkillIncreasesForAttributeStats"); - for (auto attribute : MWBase::Environment::get().getESMStore()->get<ESM::Attribute>()) + for (const auto& attribute : MWBase::Environment::get().getESMStore()->get<ESM::Attribute>()) { skillIncreasesForAttributeStatsT[ESM::RefId(attribute.mId).serializeText()] = sol::property( [=](const SkillIncreasesForAttributeStats& stat) { return stat.get(context, attribute.mId); }, |