diff options
Diffstat (limited to 'source/blender/editors/screen/workspace_edit.c')
-rw-r--r-- | source/blender/editors/screen/workspace_edit.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/screen/workspace_edit.c b/source/blender/editors/screen/workspace_edit.c index 784fa60999d..8feef0c675a 100644 --- a/source/blender/editors/screen/workspace_edit.c +++ b/source/blender/editors/screen/workspace_edit.c @@ -198,8 +198,7 @@ WorkSpace *ED_workspace_duplicate(WorkSpace *workspace_old, Main *bmain, wmWindo /* TODO(campbell): tools */ - for (WorkSpaceLayout *layout_old = layouts_old->first; layout_old; - layout_old = layout_old->next) { + LISTBASE_FOREACH (WorkSpaceLayout *, layout_old, layouts_old) { WorkSpaceLayout *layout_new = ED_workspace_layout_duplicate( bmain, workspace_new, layout_old, win); @@ -222,7 +221,7 @@ bool ED_workspace_delete(WorkSpace *workspace, Main *bmain, bContext *C, wmWindo ListBase ordered; BKE_id_ordered_list(&ordered, &bmain->workspaces); WorkSpace *prev = NULL, *next = NULL; - for (LinkData *link = ordered.first; link; link = link->next) { + LISTBASE_FOREACH (LinkData *, link, &ordered) { if (link->data == workspace) { prev = link->prev ? link->prev->data : NULL; next = link->next ? link->next->data : NULL; @@ -232,7 +231,7 @@ bool ED_workspace_delete(WorkSpace *workspace, Main *bmain, bContext *C, wmWindo BLI_freelistN(&ordered); BLI_assert((prev != NULL) || (next != NULL)); - for (wmWindow *win = wm->windows.first; win; win = win->next) { + LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { WorkSpace *workspace_active = WM_window_get_active_workspace(win); if (workspace_active == workspace) { ED_workspace_change((prev != NULL) ? prev : next, C, wm, win); @@ -481,7 +480,7 @@ static int workspace_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUS ListBase templates; BKE_appdir_app_templates(&templates); - for (LinkData *link = templates.first; link; link = link->next) { + LISTBASE_FOREACH (LinkData *, link, &templates) { char *template = link->data; char display_name[FILE_MAX]; |