This commit is contained in:
abux 2026-07-13 00:50:40 +01:00
parent 5c8e8434ec
commit b87f315b57
2 changed files with 7 additions and 0 deletions

View file

@ -26,6 +26,7 @@ pub fn KeyedSlotMap(
slot_map: SlotMap(Entry),
lookup: std.AutoHashMap(K, Handle(V)),
// --- MEMORY ---
alloc: std.mem.Allocator,
/// ----------------------------------------------------

View file

@ -101,5 +101,11 @@ pub fn SlotMap(comptime T: type) type {
if (self.generations.items[handle.idx] != handle.gen) return null;
return &self.values.items[handle.idx];
}
/// ----------------------------------------------------
/// ----------------------------------------------------
pub fn items(self: *Self) []T {
return self.values.items;
}
};
}