1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed accidental field instance copy

This commit is contained in:
Brian Fiete 2024-06-30 08:20:55 +02:00
parent fe6d5fa16f
commit 3ff7fd86af

View file

@ -4628,7 +4628,7 @@ void BfModule::Visit(BfSwitchStatement* switchStmt)
if (isPayloadEnum)
{
auto enumType = switchValue.mType->ToTypeInstance();
for (auto fieldInstance : enumType->mFieldInstances)
for (auto& fieldInstance : enumType->mFieldInstances)
{
auto fieldDef = fieldInstance.GetFieldDef();
if (fieldDef->IsEnumCaseEntry())