Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-09-30 01:08:32 +0300
committerHans Goudey <h.goudey@me.com>2020-09-30 01:08:32 +0300
commit23363ca08498b4c9d05321186f608f71b8489406 (patch)
tree0d0eb5bdef14738833249250cbbf0ab31dd9717f /source/blender/editors/space_outliner/outliner_dragdrop.c
parent1b6480ebb76db1769d7bb88be2ac932a3c558fe6 (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.c8
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;