projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e3eb198
)
code cleanup
author
Holger Schemel
<info@artsoft.org>
Fri, 3 Sep 2021 13:45:14 +0000
(15:45 +0200)
committer
Holger Schemel
<info@artsoft.org>
Fri, 3 Sep 2021 13:45:14 +0000
(15:45 +0200)
src/libgame/setup.c
patch
|
blob
|
history
diff --git
a/src/libgame/setup.c
b/src/libgame/setup.c
index 60ec59f307cc83e9aaf332a86c5b85f16b13e73d..f1223d0dd238b0098f845f54b57f574d09b903c4 100644
(file)
--- a/
src/libgame/setup.c
+++ b/
src/libgame/setup.c
@@
-1301,17
+1301,14
@@
static TreeInfo *getValidTreeInfoEntryExt(TreeInfo *node, boolean get_next_node)
if (node->parent_link) // skip first node (back link) of node group
get_next_node = TRUE;
if (node->parent_link) // skip first node (back link) of node group
get_next_node = TRUE;
- if (get_next_node)
- {
- // get next regular tree node, or step up until one is found
- while (node->next == NULL && node->node_parent != NULL)
- node = node->node_parent;
+ if (!get_next_node) // get current regular tree node
+ return node;
- return getFirstValidTreeInfoEntry(node->next);
- }
+ // get next regular tree node, or step up until one is found
+ while (node->next == NULL && node->node_parent != NULL)
+ node = node->node_parent;
- // this is a regular tree node
- return node;
+ return getFirstValidTreeInfoEntry(node->next);
}
TreeInfo *getFirstValidTreeInfoEntry(TreeInfo *node)
}
TreeInfo *getFirstValidTreeInfoEntry(TreeInfo *node)