aboutsummaryrefslogtreecommitdiff
path: root/src/docs_writer.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-03-21 15:22:11 +0000
committergingerBill <bill@gingerbill.org>2023-03-21 15:22:11 +0000
commitb3e712e0b80afcf0396a94d46f5083f429ece557 (patch)
tree292fa83c203f3eaa147bc84a5ae999d454581dcd /src/docs_writer.cpp
parent05434daa69563850f3dde75f9a9f4b35ebe689da (diff)
Correctly handle end comment for doc generation
Diffstat (limited to 'src/docs_writer.cpp')
-rw-r--r--src/docs_writer.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/docs_writer.cpp b/src/docs_writer.cpp
index 814769f57..3c60145c9 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);
+ ffor (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;