Skip to content

Commit 1125336

Browse files
committed
chore: update sdk
1 parent a9ff2fa commit 1125336

2 files changed

Lines changed: 7 additions & 15 deletions

File tree

src/main/dumpers/schemas/schemas.cpp

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,9 @@ void OutputMetadataEntry(const SchemaMetadataEntryData_t& entry, std::ofstream&
6868

6969
void DumpClasses(CSchemaSystemTypeScope* typeScope, std::filesystem::path schemaPath, std::map<std::string, std::unordered_set<std::string>>& foundFiles)
7070
{
71-
const auto& classes = typeScope->m_ClassBindings;
72-
73-
UtlTSHashHandle_t* handles = new UtlTSHashHandle_t[classes.Count()];
74-
classes.GetElements(0, classes.Count(), handles);
75-
76-
for (int j = 0; j < classes.Count(); ++j) {
77-
const auto classInfo = classes[handles[j]];
71+
FOR_EACH_MAP(typeScope->m_DeclaredClasses.m_Map, iter)
72+
{
73+
const auto classInfo = typeScope->m_DeclaredClasses.m_Map.Element(iter)->m_pClassInfo;
7874

7975
if (!std::filesystem::is_directory(schemaPath / classInfo->m_pszProjectName))
8076
if (!std::filesystem::create_directory(schemaPath / classInfo->m_pszProjectName))
@@ -144,13 +140,9 @@ void DumpClasses(CSchemaSystemTypeScope* typeScope, std::filesystem::path schema
144140

145141
void DumpEnums(CSchemaSystemTypeScope* typeScope, std::filesystem::path schemaPath, std::map<std::string, std::unordered_set<std::string>>& foundFiles)
146142
{
147-
const auto& enums = typeScope->m_EnumBindings;
148-
149-
UtlTSHashHandle_t* handles = new UtlTSHashHandle_t[enums.Count()];
150-
enums.GetElements(0, enums.Count(), handles);
151-
152-
for (int j = 0; j < enums.Count(); ++j) {
153-
const auto enumInfo = enums[handles[j]];
143+
FOR_EACH_MAP(typeScope->m_DeclaredEnums.m_Map, iter)
144+
{
145+
const auto enumInfo = typeScope->m_DeclaredEnums.m_Map.Element(iter)->m_pEnumInfo;
154146

155147
if (!std::filesystem::is_directory(schemaPath / enumInfo->m_pszProjectName))
156148
if (!std::filesystem::create_directory(schemaPath / enumInfo->m_pszProjectName))

0 commit comments

Comments
 (0)