Fioxed dictionary being recreated every step of the for loop.
This commit is contained in:
@@ -19,9 +19,9 @@ namespace BlendFile.DNA {
|
|||||||
public int slot_handle;
|
public int slot_handle;
|
||||||
[DNAFieldAttribute(4, "uchar", 3, "_pad[4]", "System.Byte[]", false, 4)]
|
[DNAFieldAttribute(4, "uchar", 3, "_pad[4]", "System.Byte[]", false, 4)]
|
||||||
public byte[] _pad = new System.Byte[4];
|
public byte[] _pad = new System.Byte[4];
|
||||||
[DNAListAttribute(8, "bActionGroup", "**group_array", 2, "bActionGroup", "group_array_num", 1, 8, 0)]
|
[DNAListAttribute(8, "bActionGroup", "**group_array", 2, "bActionGroup", "group_array_num", 1, 8, 8)]
|
||||||
public System.Collections.Generic.List<bActionGroup> group_array;
|
public System.Collections.Generic.List<bActionGroup> group_array;
|
||||||
[DNAListAttribute(8, "FCurve", "**fcurve_array", 5, "FCurve", "fcurve_array_num", 4, 16, 0)]
|
[DNAListAttribute(8, "FCurve", "**fcurve_array", 5, "FCurve", "fcurve_array_num", 4, 16, 16)]
|
||||||
public System.Collections.Generic.List<FCurve> fcurve_array;
|
public System.Collections.Generic.List<FCurve> fcurve_array;
|
||||||
public ActionChannelBag() {
|
public ActionChannelBag() {
|
||||||
this.slot_handle = default;
|
this.slot_handle = default;
|
||||||
|
|||||||
@@ -184,9 +184,9 @@ namespace CodeGenerator {
|
|||||||
ctd.Members.Add(cmf);
|
ctd.Members.Add(cmf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Dictionary<string, int> listCountOffsets = new();
|
||||||
//Add the lists to the class
|
//Add the lists to the class
|
||||||
for (var index = 0; index < type.Fields.Count; index++) {
|
for (var index = 0; index < type.Fields.Count; index++) {
|
||||||
Dictionary<string, int> listCountOffsets = new();
|
|
||||||
var field = type.Fields[index];
|
var field = type.Fields[index];
|
||||||
//Skip fields that are not part of a list
|
//Skip fields that are not part of a list
|
||||||
if (listFields.Select(f => f.Item1).Contains(field)) {
|
if (listFields.Select(f => f.Item1).Contains(field)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user