mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
Change strtabs.nextTry to match the assumption in strtabs.del
This commit is contained in:
@@ -117,7 +117,7 @@ proc mustRehash(length, counter: int): bool =
|
||||
result = (length * 2 < counter * 3) or (length - counter < 4)
|
||||
|
||||
proc nextTry(h, maxHash: Hash): Hash {.inline.} =
|
||||
result = ((5 * h) + 1) and maxHash
|
||||
result = (h + 1) and maxHash
|
||||
|
||||
proc rawGet(t: StringTableRef, key: string): int =
|
||||
var h: Hash = myhash(t, key) and high(t.data) # start with real hash value
|
||||
|
||||
Reference in New Issue
Block a user