Merge pull request #10539 from GULPF/strtabs-nexttry
Change strtabs.nextTry to match the assumption in strtabs.del
This commit is contained in:
commit
1adc749ed6
1 changed files with 1 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ proc mustRehash(length, counter: int): bool =
|
||||||
result = (length * 2 < counter * 3) or (length - counter < 4)
|
result = (length * 2 < counter * 3) or (length - counter < 4)
|
||||||
|
|
||||||
proc nextTry(h, maxHash: Hash): Hash {.inline.} =
|
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 =
|
proc rawGet(t: StringTableRef, key: string): int =
|
||||||
var h: Hash = myhash(t, key) and high(t.data) # start with real hash value
|
var h: Hash = myhash(t, key) and high(t.data) # start with real hash value
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue