From acac7b12102c837752340033624720d245ab2734 Mon Sep 17 00:00:00 2001 From: thinkerou Date: Sun, 9 Feb 2020 10:46:22 +0800 Subject: [PATCH] tree: range over nodes values (#2229) --- tree.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tree.go b/tree.go index b88eefa5..b687ec43 100644 --- a/tree.go +++ b/tree.go @@ -169,9 +169,9 @@ walk: } // Update maxParams (max of all children) - for i := range child.children { - if child.children[i].maxParams > child.maxParams { - child.maxParams = child.children[i].maxParams + for _, v := range child.children { + if v.maxParams > child.maxParams { + child.maxParams = v.maxParams } }