aboutsummaryrefslogtreecommitdiff
path: root/tree.tcl
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2021-01-10 11:34:06 +1000
committerSteve Bennett <steveb@workware.net.au>2022-08-21 17:17:25 +1000
commit25e8086a9e702cad24186826cdbc59bfc5a107cb (patch)
tree1b538b5ce04e7853dde63884cd9696e64f890d42 /tree.tcl
parentc7e36a85847e6bfda7f87936e4c3b81dd5f81268 (diff)
downloadjimtcl-25e8086a9e702cad24186826cdbc59bfc5a107cb.zip
jimtcl-25e8086a9e702cad24186826cdbc59bfc5a107cb.tar.gz
jimtcl-25e8086a9e702cad24186826cdbc59bfc5a107cb.tar.bz2
tree: node ids are now simple integers
Dictionary lookups with simple integers are more efficient than with "node<integer>" Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tree.tcl')
-rw-r--r--tree.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/tree.tcl b/tree.tcl
index 38a0a94..0d6c481 100644
--- a/tree.tcl
+++ b/tree.tcl
@@ -143,7 +143,7 @@ tree method getall {node} {
tree method insert {node {index end}} {
# Make a new node and add it to the tree
- set childname node[incr nodeid]
+ set childname [incr nodeid]
dict set tree $childname {}
# The new node has no children