Skip to content

Commit

Permalink
Don't remove wildcard pair when calling .Remove<T>() using enum type …
Browse files Browse the repository at this point in the history
…argument
  • Loading branch information
BeanCheeseBurrito committed Jul 29, 2024
1 parent 2292c3b commit 13ce333
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/Flecs.NET.Tests/Cpp/UnionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private void SwitchEnumType()
Assert.True(e.Has<Color>(Ecs.Wildcard));
Assert.True(e.Table() == table);

e.Remove<Color>();
e.Remove<Color>(Ecs.Wildcard);
Assert.True(!e.Has(Color.Red));
Assert.True(!e.Has(Color.Green));
Assert.True(!e.Has(Color.Blue));
Expand Down
3 changes: 0 additions & 3 deletions src/Flecs.NET/Core/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2047,9 +2047,6 @@ public ref Entity Remove(ulong first, ulong second)
/// <returns></returns>
public ref Entity Remove<T>()
{
if (typeof(T).IsEnum)
return ref Remove<T>(EcsWildcard);

return ref Remove(Type<T>.Id(World));
}

Expand Down

0 comments on commit 13ce333

Please sign in to comment.