diff options
author | Hans Goudey <h.goudey@me.com> | 2020-09-30 01:08:32 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-09-30 01:08:32 +0300 |
commit | 23363ca08498b4c9d05321186f608f71b8489406 (patch) | |
tree | 0d0eb5bdef14738833249250cbbf0ab31dd9717f /source/blender/editors/space_outliner/outliner_dragdrop.c | |
parent | 1b6480ebb76db1769d7bb88be2ac932a3c558fe6 (diff) |
Cleanup: Use LISTBASE_FOREACH macro in outliner code
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_dragdrop.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_dragdrop.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c index 302d606e4c8..cbe6887f66e 100644 --- a/source/blender/editors/space_outliner/outliner_dragdrop.c +++ b/source/blender/editors/space_outliner/outliner_dragdrop.c @@ -85,8 +85,8 @@ static TreeElement *outliner_dropzone_element(TreeElement *te, } /* Not it. Let's look at its children. */ if (children && (TREESTORE(te)->flag & TSE_CLOSED) == 0 && (te->subtree.first)) { - for (te = te->subtree.first; te; te = te->next) { - TreeElement *te_valid = outliner_dropzone_element(te, fmval, children); + LISTBASE_FOREACH (TreeElement *, te_sub, &te->subtree) { + TreeElement *te_valid = outliner_dropzone_element(te_sub, fmval, children); if (te_valid) { return te_valid; } @@ -100,9 +100,7 @@ static TreeElement *outliner_dropzone_find(const SpaceOutliner *space_outliner, const float fmval[2], const bool children) { - TreeElement *te; - - for (te = space_outliner->tree.first; te; te = te->next) { + LISTBASE_FOREACH (TreeElement *, te, &space_outliner->tree) { TreeElement *te_valid = outliner_dropzone_element(te, fmval, children); if (te_valid) { return te_valid; |