parent
8c719fce54
commit
06f8c5cb6f
1 changed files with 2 additions and 1 deletions
|
|
@ -35,8 +35,9 @@ proc rawInsert[A](s: var HashSet[A], data: var KeyValuePairSeq[A], key: A,
|
|||
|
||||
proc enlarge[A](s: var HashSet[A]) =
|
||||
var n: KeyValuePairSeq[A]
|
||||
newSeq(n, len(s.data) * growthFactor)
|
||||
newSeq(n, s.counter.rightSize)
|
||||
swap(s.data, n) # n is now old seq
|
||||
s.countDeleted = 0
|
||||
for i in countup(0, high(n)):
|
||||
if isFilledAndValid(n[i].hcode):
|
||||
var j = -1 - rawGetKnownHC(s, n[i].key, n[i].hcode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue