summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Kortunov <andrei.kortunov@yandex.ru>2024-02-23 17:02:40 +0400
committerAndrei Kortunov <andrei.kortunov@yandex.ru>2024-02-23 17:02:40 +0400
commit1126f38a1e7c6b08cf8777ffdcad0c29c0023653 (patch)
tree4e5201905783a9d12c99dd2f5955db74f3ea827d
parentfc1f2446278516e7936663c470addf5c5abd076c (diff)
Do not copy the whole attributes store
-rw-r--r--apps/openmw/mwlua/stats.cpp2
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); },