From 80780054b5d214783824df47c8591cdd43efe38c Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Tue, 16 Apr 2024 19:14:37 -0700 Subject: [PATCH] module: fix removeComponent, add TODO about stack space Signed-off-by: Stephen Gutekanst --- src/module/module.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/module/module.zig b/src/module/module.zig index 16f8af48..02e32c84 100644 --- a/src/module/module.zig +++ b/src/module/module.zig @@ -339,6 +339,7 @@ pub fn Modules(comptime modules: anytype) type { // TODO: parallel / multi-threaded dispatch // TODO: PGO + // TODO(important): we may exceed stack space here, consider moving to heap. var buf: [8 * 1024 * 1024]u8 = undefined; while (true) { // Dequeue the next event @@ -530,7 +531,7 @@ pub fn ModSet(comptime modules: anytype) type { /// Removes an entity. pub inline fn removeEntity(m: *@This(), entity: EntityID) !void { - try m.entities.removeEntity(entity); + try m.entities.remove(entity); } /// Sets the named component to the specified value for the given entity,