Remove depthFirst parameter from WMTreeWalk.
WMTreeWalk is only called once, with depthFirst set to true, so we might as well just hard-code that behavior. Also, this parameter appears to have been misnamed (since the search is always DFS) and should properly be named to indicate that it controls if this is a pre- or post-order traversal.
This commit is contained in:
+1
-1
@@ -178,7 +178,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
WMSortTree(menu, menuSortFunc);
|
||||
WMTreeWalk(menu, assemblePLMenuFunc, previousDepth, True);
|
||||
WMTreeWalk(menu, assemblePLMenuFunc, previousDepth);
|
||||
|
||||
i = WMGetArrayItemCount(plMenuNodes);
|
||||
if (i > 2) { /* more than one submenu unprocessed is almost certainly an error */
|
||||
|
||||
Reference in New Issue
Block a user