tree: range over nodes values

This commit is contained in:
thinkerou 2020-02-08 20:12:40 +08:00
parent 0e4d8eaf07
commit b107e24883

View File

@ -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
}
}