C++: Types with enum fields will be output in a way that preserves alignment (#62)

This commit is contained in:
Katy Coe
2020-09-10 16:06:16 +02:00
parent 4a2cc55cb6
commit d26b2d91a8
2 changed files with 42 additions and 11 deletions

View File

@@ -57,9 +57,9 @@ namespace Il2CppInspector.Cpp
CppComplexType t when string.IsNullOrEmpty(t.Name) => (format == "o"? "\n" : "")
+ t.ToString(format)[..^2] + (Name.Length > 0? " " + Name : ""),
// function pointers
CppFnPtrType t when string.IsNullOrEmpty(t.Name) => t.ToFieldString(Name),
CppFnPtrType t when string.IsNullOrEmpty(t.Name) => t.ToFieldString(Name, format),
// regular fields
_ => $"{Type.ToFieldString(Name)}" + (BitfieldSize > 0? $" : {BitfieldSize}" : "")
_ => $"{Type.ToFieldString(Name, format)}" + (BitfieldSize > 0? $" : {BitfieldSize}" : "")
};
var suffix = "";