Fioxed dictionary being recreated every step of the for loop.

This commit is contained in:
Samuele Lorefice
2025-03-06 19:14:59 +01:00
parent 9e1d65d08d
commit e11cd54096
2 changed files with 3 additions and 3 deletions

View File

@@ -184,9 +184,9 @@ namespace CodeGenerator {
ctd.Members.Add(cmf);
}
Dictionary<string, int> listCountOffsets = new();
//Add the lists to the class
for (var index = 0; index < type.Fields.Count; index++) {
Dictionary<string, int> listCountOffsets = new();
var field = type.Fields[index];
//Skip fields that are not part of a list
if (listFields.Select(f => f.Item1).Contains(field)) {