From 307577d3992cae96248c76318b116af009f96e08 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 9 Dec 2022 10:35:19 -0800 Subject: [PATCH] FilterSignature IEquatable --- src/FilterSignature.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/FilterSignature.cs b/src/FilterSignature.cs index 4965cd1..8fd65ec 100644 --- a/src/FilterSignature.cs +++ b/src/FilterSignature.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; namespace MoonTools.ECS { - public struct FilterSignature + public struct FilterSignature : IEquatable { public readonly HashSet Included; public readonly HashSet 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); + } } }