Sort StructuredDataDef members and entries alphabetically after parsing

This commit is contained in:
Jan
2022-03-22 15:09:07 +01:00
parent 1b6f2ab9fa
commit ab5a998903
7 changed files with 19 additions and 17 deletions

View File

@ -54,12 +54,6 @@ namespace sdd::enum_scope_sequences
void ProcessMatch(StructuredDataDefParserState* state, SequenceResult<SimpleParserValue>& result) const override
{
assert(state->m_current_enum != nullptr);
std::sort(state->m_current_enum->m_entries.begin(), state->m_current_enum->m_entries.end(), [](const CommonStructuredDataEnumEntry& e1, const CommonStructuredDataEnumEntry& e2)
{
return e1.m_name < e2.m_name;
});
state->m_current_enum = nullptr;
}
};

View File

@ -234,9 +234,6 @@ namespace sdd::struct_scope_sequences
state->m_current_struct->m_size_in_byte = utils::Align(state->m_current_struct_padding_offset, 8u) / 8;
state->m_current_struct_padding_offset = 0u;
// Sort the entries of the struct alphabetically
state->m_current_struct->SortPropertiesByName();
state->m_current_struct = nullptr;
}
};