Skip to content

Commit 4586427

Browse files
committed
Added compiler size check for classes.
1 parent 613b19c commit 4586427

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ReClass.NET/CodeGenerator/CppCodeGenerator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ private void WriteClass(IndentedTextWriter writer, ClassNode @class, IEnumerable
348348
writer.Indent--;
349349
writer.Write("}; //Size: 0x");
350350
writer.WriteLine($"{@class.MemorySize:X04}");
351+
352+
writer.WriteLine($"static_assert(sizeof({@class.Name}) == 0x{@class.MemorySize:X});");
351353
}
352354

353355
/// <summary>

0 commit comments

Comments
 (0)