From f9697543e43b74074727a89f9dc1bc9717536c46 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Thu, 20 Aug 2020 09:34:09 -0400 Subject: Revert "Cleanup: Use LISTBASE_FOREACH in editors screen directory" This reverts commit 52f40bcff21b285b7eaa21aaa9c6c7b9d6fa8669. Apologies for the noise. I caught a problem with this that I hadn't before. I will commit later after thorough testing. --- source/blender/editors/screen/workspace_edit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/screen/workspace_edit.c') diff --git a/source/blender/editors/screen/workspace_edit.c b/source/blender/editors/screen/workspace_edit.c index b93734272bc..b20dc80d158 100644 --- a/source/blender/editors/screen/workspace_edit.c +++ b/source/blender/editors/screen/workspace_edit.c @@ -409,7 +409,8 @@ static void workspace_add_menu(bContext *UNUSED(C), uiLayout *layout, void *temp WorkspaceConfigFileData *builtin_config = workspace_system_file_read(app_template); if (startup_config) { - LISTBASE_FOREACH (WorkSpace *, workspace, &startup_config->workspaces) { + for (WorkSpace *workspace = startup_config->workspaces.first; workspace; + workspace = workspace->id.next) { uiLayout *row = uiLayoutRow(layout, false); workspace_append_button(row, ot_append, workspace, startup_config->main); has_startup_items = true; @@ -419,7 +420,8 @@ static void workspace_add_menu(bContext *UNUSED(C), uiLayout *layout, void *temp if (builtin_config) { bool has_title = false; - LISTBASE_FOREACH (WorkSpace *, workspace, &startup_config->workspaces) { + for (WorkSpace *workspace = builtin_config->workspaces.first; workspace; + workspace = workspace->id.next) { if (startup_config && BLI_findstring(&startup_config->workspaces, workspace->id.name, offsetof(ID, name))) { continue; -- cgit v1.2.3