Skip to content

Commit

Permalink
Update misleading comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaZupan committed Apr 23, 2024
1 parent 9a5cf34 commit d9f3052
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public ProbabilisticMapState(ReadOnlySpan<char> values, int maxInclusive)
_hashEntries = new char[modulus];

// Some hash entries will remain unused.
// We can't leave them uninitialized as that would lead to false positives for values divisible by modulus.
// We can't leave them uninitialized as we would otherwise erroneously match (char)0.
// The exact value doesn't matter, as long as it's in the set of our values.
_hashEntries.AsSpan().Fill(values[0]);

foreach (char c in values)
Expand Down

0 comments on commit d9f3052

Please sign in to comment.