tree: range over nodes values (#2229)

This commit is contained in:
thinkerou 2020-02-09 10:46:22 +08:00 committed by GitHub
parent 731c827892
commit acac7b1210
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

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