Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/NesTiler.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'NesTiler/Tile.cs')
-rw-r--r--NesTiler/Tile.cs5
1 files changed, 1 insertions, 4 deletions
diff --git a/NesTiler/Tile.cs b/NesTiler/Tile.cs
index 57aca75..98739c0 100644
--- a/NesTiler/Tile.cs
+++ b/NesTiler/Tile.cs
@@ -9,7 +9,6 @@ namespace com.clusterrr.Famicom.NesTiler
public readonly byte[] Pixels;
public const int Width = 8;
public readonly int Height;
- private int? hash;
private byte[]? data = null;
public Tile(byte[] data, int height)
@@ -52,12 +51,10 @@ namespace com.clusterrr.Famicom.NesTiler
public override int GetHashCode()
{
- if (hash != null) return hash.Value;
var crc = new Crc32();
crc.Append(GetAsPatternData());
var hashBytes = crc.GetCurrentHash();
- hash = BitConverter.ToInt32(hashBytes, 0);
- return hash.Value;
+ return BitConverter.ToInt32(hashBytes, 0);
}
}
}