diff --git a/src/keyed_slot_map.zig b/src/keyed_slot_map.zig index 7683831..0a11245 100644 --- a/src/keyed_slot_map.zig +++ b/src/keyed_slot_map.zig @@ -26,6 +26,7 @@ pub fn KeyedSlotMap( slot_map: SlotMap(Entry), lookup: std.AutoHashMap(K, Handle(V)), + // --- MEMORY --- alloc: std.mem.Allocator, /// ---------------------------------------------------- diff --git a/src/slot_map.zig b/src/slot_map.zig index d4e9033..bb90970 100644 --- a/src/slot_map.zig +++ b/src/slot_map.zig @@ -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; + } }; }