summary refs log tree commit diff stats
path: root/tests/manyloc/argument_parser
diff options
context:
space:
mode:
authorCharles Blake <cblake@csail.mit.edu>2015-02-13 08:33:15 -0500
committerCharles Blake <cblake@csail.mit.edu>2015-02-13 08:33:15 -0500
commit0a1bc0e9cd30ef1a3654e7637795ed22010e7977 (patch)
treeb798069e81bd21275c74d363d4368a299dad0036 /tests/manyloc/argument_parser
parentd129e8f6c6b6b39ed76b2e71f0179a1eb6171f1d (diff)
downloadNim-0a1bc0e9cd30ef1a3654e7637795ed22010e7977.tar.gz
Update a use of initTable to avoid initial enlarge.
Diffstat (limited to 'tests/manyloc/argument_parser')
-rw-r--r--tests/manyloc/argument_parser/argument_parser.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/manyloc/argument_parser/argument_parser.nim b/tests/manyloc/argument_parser/argument_parser.nim
index af671cd85..a507a08e4 100644
--- a/tests/manyloc/argument_parser/argument_parser.nim
+++ b/tests/manyloc/argument_parser/argument_parser.nim
@@ -302,7 +302,7 @@ template build_specification_lookup():
   ## Returns the table used to keep pointers to all of the specifications.
   var result {.gensym.}: OrderedTable[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 param_to_detect in expected[i].names:
       if result.hasKey(param_to_detect):