diff options
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_utils.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_utils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c index 188a4e64897..a058c30cef2 100644 --- a/source/blender/editors/space_outliner/outliner_utils.c +++ b/source/blender/editors/space_outliner/outliner_utils.c @@ -78,7 +78,7 @@ TreeElement *outliner_find_item_at_y(const SpaceOutliner *soops, const ListBase *tree, float view_co_y) { - for (TreeElement *te_iter = tree->first; te_iter; te_iter = te_iter->next) { + LISTBASE_FOREACH (TreeElement *, te_iter, tree) { if (view_co_y < (te_iter->ys + UI_UNIT_Y)) { if (view_co_y >= te_iter->ys) { /* co_y is inside this element */ @@ -204,7 +204,7 @@ TreeElement *outliner_find_tse(SpaceOutliner *soops, const TreeStoreElem *tse) /* Find treestore that refers to given ID */ TreeElement *outliner_find_id(SpaceOutliner *soops, ListBase *lb, const ID *id) { - for (TreeElement *te = lb->first; te; te = te->next) { + LISTBASE_FOREACH (TreeElement *, te, lb) { TreeStoreElem *tselem = TREESTORE(te); if (tselem->type == 0) { if (tselem->id == id) { @@ -222,7 +222,7 @@ TreeElement *outliner_find_id(SpaceOutliner *soops, ListBase *lb, const ID *id) TreeElement *outliner_find_posechannel(ListBase *lb, const bPoseChannel *pchan) { - for (TreeElement *te = lb->first; te; te = te->next) { + LISTBASE_FOREACH (TreeElement *, te, lb) { if (te->directdata == pchan) { return te; } @@ -240,7 +240,7 @@ TreeElement *outliner_find_posechannel(ListBase *lb, const bPoseChannel *pchan) TreeElement *outliner_find_editbone(ListBase *lb, const EditBone *ebone) { - for (TreeElement *te = lb->first; te; te = te->next) { + LISTBASE_FOREACH (TreeElement *, te, lb) { if (te->directdata == ebone) { return te; } @@ -361,7 +361,7 @@ float outliner_restrict_columns_width(const SpaceOutliner *soops) /* Find first tree element in tree with matching treestore flag */ TreeElement *outliner_find_element_with_flag(const ListBase *lb, short flag) { - for (TreeElement *te = lb->first; te; te = te->next) { + LISTBASE_FOREACH (TreeElement *, te, lb) { if ((TREESTORE(te)->flag & flag) == flag) { return te; } |