From 47874c3e7c6d8167fc606763f9b5f46dfe0c8ebe Mon Sep 17 00:00:00 2001 From: DCFApixels <99481254+DCFApixels@users.noreply.github.com> Date: Tue, 19 Nov 2024 21:09:30 +0800 Subject: [PATCH] fix --- src/Internal/SparseMatrix.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Internal/SparseMatrix.cs b/src/Internal/SparseMatrix.cs index cf100dc..97600bb 100644 --- a/src/Internal/SparseMatrix.cs +++ b/src/Internal/SparseMatrix.cs @@ -71,15 +71,14 @@ namespace DCFApixels.DragonECS.Graphs.Internal { unchecked { - long key = KeyUtility.FromXY(x, y); #if DEBUG - if (FindEntry(key) >= 0) + if (FindEntry(x, y) >= 0) { Throw.ArgumentException("Has(x, y) is true"); } #endif int hash = IntHash.hashes[y] ^ x; - AddInternal(key, hash, value); + AddInternal(KeyUtility.FromXY(x, y), hash, value); } } [MethodImpl(MethodImplOptions.AggressiveInlining)]