mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-20 01:29:20 +03:00
Treeview: Slight simplification of treeview_walk_internal().
This commit is contained in:
parent
0a0ad71bdb
commit
45a7e6269b
@ -566,13 +566,12 @@ treeview_walk_internal(treeview_node *root,
|
|||||||
node = root;
|
node = root;
|
||||||
parent = node->parent;
|
parent = node->parent;
|
||||||
next_sibling = node->next_sib;
|
next_sibling = node->next_sib;
|
||||||
child = (!skip_children &&
|
child = (full || (node->flags & TV_NFLAGS_EXPANDED)) ?
|
||||||
(full || (node->flags & TV_NFLAGS_EXPANDED))) ?
|
|
||||||
node->children : NULL;
|
node->children : NULL;
|
||||||
|
|
||||||
while (node != NULL) {
|
while (node != NULL) {
|
||||||
|
|
||||||
if (child != NULL) {
|
if (child != NULL && !skip_children) {
|
||||||
/* Down to children */
|
/* Down to children */
|
||||||
node = child;
|
node = child;
|
||||||
} else {
|
} else {
|
||||||
@ -639,7 +638,6 @@ treeview_walk_internal(treeview_node *root,
|
|||||||
return NSERROR_OK;
|
return NSERROR_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
child = skip_children ? NULL : child;
|
|
||||||
}
|
}
|
||||||
return NSERROR_OK;
|
return NSERROR_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user