FilterSignature IEquatable

filter_relations
cosmonaut 2022-12-09 10:35:19 -08:00
parent 11488eba60
commit 307577d399
1 changed files with 11 additions and 1 deletions

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace MoonTools.ECS
{
public struct FilterSignature
public struct FilterSignature : IEquatable<FilterSignature>
{
public readonly HashSet<int> Included;
public readonly HashSet<int> Excluded;
@ -40,5 +40,15 @@ namespace MoonTools.ECS
return hashcode;
}
public static bool operator ==(FilterSignature left, FilterSignature right)
{
return left.Equals(right);
}
public static bool operator !=(FilterSignature left, FilterSignature right)
{
return !(left == right);
}
}
}