From 99174ece5c33ef9d37982b62215407b6d505724c Mon Sep 17 00:00:00 2001 From: copygirl Date: Wed, 17 May 2023 21:13:25 +0200 Subject: [PATCH] Use ecs_iter_is_true in Iterator.Any --- src/gaemstone.ECS/Internal/Iterator.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gaemstone.ECS/Internal/Iterator.cs b/src/gaemstone.ECS/Internal/Iterator.cs index 8d2dd5a..8867701 100644 --- a/src/gaemstone.ECS/Internal/Iterator.cs +++ b/src/gaemstone.ECS/Internal/Iterator.cs @@ -55,12 +55,12 @@ public unsafe class Iterator public virtual bool Next() => ecs_iter_next(Handle); - public bool Any() - { using (this) return Next(); } - public Entity First() => new(ecs_iter_first(Handle)); + public bool Any() + => ecs_iter_is_true(Handle); + public IEnumerable GetAllEntities() { while (Next())