Yes
This commit is contained in:
parent
5c8e8434ec
commit
b87f315b57
2 changed files with 7 additions and 0 deletions
|
|
@ -26,6 +26,7 @@ pub fn KeyedSlotMap(
|
|||
slot_map: SlotMap(Entry),
|
||||
lookup: std.AutoHashMap(K, Handle(V)),
|
||||
|
||||
// --- MEMORY ---
|
||||
alloc: std.mem.Allocator,
|
||||
|
||||
/// ----------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue