aboutsummaryrefslogtreecommitdiff
path: root/src/docs_writer.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-04-26 13:12:23 +0100
committergingerBill <bill@gingerbill.org>2024-04-26 13:12:23 +0100
commit7305478261700fc95f6748ba3091978a3fe7b1f3 (patch)
tree00642aaf16839dddf1bd7e0e5e675dcac19763b7 /src/docs_writer.cpp
parent94e0707456bd2dc697cff055810e36d68e0f5a47 (diff)
Minor changes
Diffstat (limited to 'src/docs_writer.cpp')
-rw-r--r--src/docs_writer.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/docs_writer.cpp b/src/docs_writer.cpp
index 9ced78d33..ba71eae4d 100644
--- a/src/docs_writer.cpp
+++ b/src/docs_writer.cpp
@@ -987,9 +987,8 @@ 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 (u32 i = 0; i < w->entity_cache.count; i++) {
- Entity *e = w->entity_cache.entries[i].key;
- array_add(&entities, e);
+ for (auto const &entry : w->entity_cache) {
+ array_add(&entities, entry.key);
}
for (Entity *e : entities) {
GB_ASSERT(e != nullptr);
@@ -998,9 +997,9 @@ gb_internal void odin_doc_update_entities(OdinDocWriter *w) {
}
}
- 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;
+ for (auto const &entry : w->entity_cache) {
+ Entity *e = entry.key;
+ OdinDocEntityIndex entity_index = entry.value;
OdinDocTypeIndex type_index = odin_doc_type(w, e->type);
OdinDocEntityIndex foreign_library = 0;