Print debug info about structured data def when compiled with the debug flag for it

This commit is contained in:
Jan
2022-03-20 16:59:37 +01:00
parent 3fc9eac5f0
commit fef646fded
3 changed files with 20 additions and 0 deletions

View File

@ -46,6 +46,13 @@ void StructuredDataDefDumperNew::DumpEnum(const CommonStructuredDataEnum& _enum)
void StructuredDataDefDumperNew::DumpStruct(const CommonStructuredDataStruct& _struct)
{
#ifdef STRUCTUREDDATADEF_DEBUG
Indent();
m_stream << "// BitOffset: " << _struct.m_bit_offset << "\n";
Indent();
m_stream << "// Size (Byte): " << _struct.m_size_in_byte << "\n";
#endif
Indent();
m_stream << "struct " << _struct.m_name << "\n";
@ -78,6 +85,11 @@ void StructuredDataDefDumperNew::DumpDef(const CommonStructuredDataDef& def)
m_stream << "// ====================\n";
#ifdef STRUCTUREDDATADEF_DEBUG
m_stream << "// Size (Byte): " << def.m_size_in_byte << "\n";
m_stream << "// Checksum: " << def.m_checksum << "\n";
#endif
m_stream << "version " << def.m_version << "\n{\n";
IncIndent();