1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

PopulateReified mutate-while-iterating fix

This commit is contained in:
Brian Fiete 2021-05-12 08:19:05 -04:00
parent 77ec0563b2
commit 57609543a3

View file

@ -5312,9 +5312,14 @@ void BfCompiler::PopulateReified()
BfLogSysM("PopulateReified iteration start\n");
int typeCount = 0;
Array<BfType*> typeList;
typeList.Reserve(context->mResolvedTypes.mCount);
for (auto type : context->mResolvedTypes)
{
typeList.Add(type);
int typeCount = 0;
for (auto type : typeList)
{
auto module = type->GetModule();
typeCount++;