From 1c44cf61c7afe2c0eb8725d602072a2aee6c8ac2 Mon Sep 17 00:00:00 2001 From: copygirl Date: Tue, 5 Mar 2024 09:24:47 +0100 Subject: [PATCH] Make Entity.getMut return non-nullable pointer --- src/entity.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/entity.zig b/src/entity.zig index 37a6722..5517968 100644 --- a/src/entity.zig +++ b/src/entity.zig @@ -311,7 +311,7 @@ pub fn Entity(comptime ctx: anytype) type { return @alignCast(@ptrCast(ptr)); } - pub fn getMut(self: Self, comptime T: type) ?*T { + pub fn getMut(self: Self, comptime T: type) *T { const id = Context.lookup(T).*; const ptr = c.ecs_get_mut_id(self.world.raw, self.raw, id); return @alignCast(@ptrCast(ptr));