Update a use of initTable to avoid initial enlarge.
This commit is contained in:
parent
d129e8f6c6
commit
0a1bc0e9cd
1 changed files with 1 additions and 1 deletions
|
|
@ -302,7 +302,7 @@ template build_specification_lookup():
|
||||||
## Returns the table used to keep pointers to all of the specifications.
|
## Returns the table used to keep pointers to all of the specifications.
|
||||||
var result {.gensym.}: OrderedTable[string, ptr Tparameter_specification]
|
var result {.gensym.}: OrderedTable[string, ptr Tparameter_specification]
|
||||||
result = initOrderedTable[string, ptr Tparameter_specification](
|
result = initOrderedTable[string, ptr Tparameter_specification](
|
||||||
nextPowerOfTwo(expected.len))
|
tables.rightSize(expected.len))
|
||||||
for i in 0..expected.len-1:
|
for i in 0..expected.len-1:
|
||||||
for param_to_detect in expected[i].names:
|
for param_to_detect in expected[i].names:
|
||||||
if result.hasKey(param_to_detect):
|
if result.hasKey(param_to_detect):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue