diff options
| author | Dragos Popescu <31741257+DragosPopse@users.noreply.github.com> | 2023-03-22 12:08:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-22 12:08:45 +0100 |
| commit | 144d034475cd52e969f030d5b4b0864234445e6f (patch) | |
| tree | bef548b1eb11640f9ae6671ae1cee4cabfba8e90 /src/docs_writer.cpp | |
| parent | ef3d8bdc428a8248ff108f3a4d5ba0fc866ca9e3 (diff) | |
| parent | e58915e12fdfc499b10adec4f3f0a61c7aa821ea (diff) | |
Merge branch 'odin-lang:master' into master
Diffstat (limited to 'src/docs_writer.cpp')
| -rw-r--r-- | src/docs_writer.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/docs_writer.cpp b/src/docs_writer.cpp index 814769f57..7488e955a 100644 --- a/src/docs_writer.cpp +++ b/src/docs_writer.cpp @@ -915,18 +915,20 @@ gb_internal void odin_doc_update_entities(OdinDocWriter *w) { auto entities = array_make<Entity *>(heap_allocator(), 0, w->entity_cache.count); defer (array_free(&entities)); - for (auto const &entry : w->entity_cache) { - array_add(&entities, entry.key); + for (u32 i = 0; i < w->entity_cache.count; i++) { + Entity *e = w->entity_cache.entries[i].key; + array_add(&entities, e); } for (Entity *e : entities) { + GB_ASSERT(e != nullptr); OdinDocTypeIndex type_index = odin_doc_type(w, e->type); gb_unused(type_index); } } - for (auto const &entry : w->entity_cache) { - Entity *e = entry.key; - OdinDocEntityIndex entity_index = entry.value; + for (u32 i = 0; i < w->entity_cache.count; i++) { + Entity *e = w->entity_cache.entries[i].key; + OdinDocEntityIndex entity_index = w->entity_cache.entries[i].value; OdinDocTypeIndex type_index = odin_doc_type(w, e->type); OdinDocEntityIndex foreign_library = 0; |