Replace countup(x, y) with x .. y

This commit is contained in:
Clyybber 2019-05-07 12:37:28 +02:00
commit cc28eef38e
35 changed files with 103 additions and 103 deletions

View file

@ -84,7 +84,7 @@ proc nodeTablePut*(t: var TNodeTable, key: PNode, val: int) =
else:
if mustRehash(len(t.data), t.counter):
newSeq(n, len(t.data) * GrowthFactor)
for i in countup(0, high(t.data)):
for i in 0 .. high(t.data):
if t.data[i].key != nil:
nodeTableRawInsert(n, t.data[i].h, t.data[i].key, t.data[i].val)
swap(t.data, n)
@ -101,7 +101,7 @@ proc nodeTableTestOrSet*(t: var TNodeTable, key: PNode, val: int): int =
else:
if mustRehash(len(t.data), t.counter):
newSeq(n, len(t.data) * GrowthFactor)
for i in countup(0, high(t.data)):
for i in 0 .. high(t.data):
if t.data[i].key != nil:
nodeTableRawInsert(n, t.data[i].h, t.data[i].key, t.data[i].val)
swap(t.data, n)