diff --git a/src/entities.odin b/src/entities.odin index 8e16b60..959f5cf 100644 --- a/src/entities.odin +++ b/src/entities.odin @@ -44,7 +44,7 @@ single :: proc(storage: ^Storage($T)) -> (Entity, ^T) { for i, &v in slice(storage) { return i, &v } - return Entity{}, new(T) + return 0, nil } // get component of type from entity @@ -54,8 +54,3 @@ get_component :: proc(entity: Entity, storage: ^Storage($T)) -> ^T { } return new(T) } - -// alias for direct mutation access -get_component_with_ref :: proc(entity: Entity, storage: ^Storage($T)) -> ^T { - return get_component(entity, storage) -}