diff --git a/BitFaster.Caching/Lfu/CmSketchCore.cs b/BitFaster.Caching/Lfu/CmSketchCore.cs index 9764c51b..f27c37d6 100644 --- a/BitFaster.Caching/Lfu/CmSketchCore.cs +++ b/BitFaster.Caching/Lfu/CmSketchCore.cs @@ -168,7 +168,7 @@ private void EnsureCapacity(long maximumSize) size = 0; } - private unsafe int EstimateFrequencyStd(T value) + private int EstimateFrequencyStd(T value) { int blockHash = Spread(comparer.GetHashCode(value)); int counterHash = Rehash(blockHash); @@ -198,7 +198,7 @@ private unsafe int EstimateFrequencyStd(T value) return Math.Min(Math.Min(count0, count1), Math.Min(count2, count3)); } - private unsafe void IncrementStd(T value) + private void IncrementStd(T value) { int blockHash = Spread(comparer.GetHashCode(value)); int counterHash = Rehash(blockHash);