diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2022-10-24 13:02:06 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2022-10-24 13:02:06 +0300 |
commit | d07d875e7fc77054195afd75413c25821bd0a47c (patch) | |
tree | 1262713f75b4fcdba6eae3f11a8a9634e0408843 | |
parent | e4e713a1c7e1caff26a74def77f75cb5b2d7dcda (diff) |
Optimization.
-rw-r--r-- | NesTiler/Tile.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/NesTiler/Tile.cs b/NesTiler/Tile.cs index e20d81d..d5e80e8 100644 --- a/NesTiler/Tile.cs +++ b/NesTiler/Tile.cs @@ -43,6 +43,9 @@ namespace com.clusterrr.Famicom.NesTiler public bool Equals(Tile other)
{
+ var hash1 = GetHashCode();
+ var hash2 = other.GetHashCode();
+ if (hash1 != hash2) return false;
var data1 = GetAsTileData();
var data2 = other.GetAsTileData();
return Enumerable.SequenceEqual(data1, data2);
|