From 3612ce55796427a67ba070df165b46698b2d9ace Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Nov 2018 15:22:01 +1100 Subject: Cleanup: name macros w/ matching BEGIN/END --- source/blender/editors/space_node/node_draw.c | 4 ++-- source/blender/editors/space_node/node_edit.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/editors/space_node') diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 3b6a227d124..9a7d913f24e 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -167,11 +167,11 @@ void ED_node_tag_update_nodetree(Main *bmain, bNodeTree *ntree, bNode *node) /* look through all datablocks, to support groups */ if (do_tag_update) { - FOREACH_NODETREE(bmain, tntree, id) { + FOREACH_NODETREE_BEGIN(bmain, tntree, id) { /* check if nodetree uses the group */ if (ntreeHasTree(tntree, ntree)) ED_node_tag_update_id(id); - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (ntree->type == NTREE_TEXTURE) diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 97c5157486d..c1fd7aa120f 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -329,10 +329,10 @@ void snode_dag_update(bContext *C, SpaceNode *snode) /* for groups, update all ID's using this */ if (snode->edittree != snode->nodetree) { - FOREACH_NODETREE(bmain, tntree, id) { + FOREACH_NODETREE_BEGIN(bmain, tntree, id) { if (ntreeHasTree(tntree, snode->edittree)) DAG_id_tag_update(id, 0); - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } DAG_id_tag_update(snode->id, 0); @@ -2452,17 +2452,17 @@ static int node_shader_script_update_exec(bContext *C, wmOperator *op) if (text) { /* clear flags for recursion check */ - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_SHADER) ntree->done = false; - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { if (!ntree->done) found |= node_shader_script_update_text_recursive(engine, type, ntree, text); } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; if (!found) BKE_report(op->reports, RPT_INFO, "Text not used by any node, no update done"); -- cgit v1.2.3 From 6429e6c91ef4422083ed56b068dea636a322fe12 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Nov 2018 15:35:15 +1100 Subject: Cleanup: ensure '_END' macros end with a semicolon Missing these breaks auto-indent for editors that don't expand macros. --- source/blender/editors/space_node/drawnode.c | 4 ++-- source/blender/editors/space_node/node_templates.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_node') diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 46172da6b04..0dc057e754b 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3057,7 +3057,7 @@ void ED_node_init_butfuncs(void) NodeSocketTypeUndefined.interface_draw_color = node_socket_undefined_interface_draw_color; /* node type ui functions */ - NODE_TYPES_BEGIN(ntype) + NODE_TYPES_BEGIN(ntype) { /* default ui functions */ ntype->draw_nodetype = node_draw_default; ntype->draw_nodetype_prepare = node_update_default; @@ -3075,7 +3075,7 @@ void ED_node_init_butfuncs(void) /* define update callbacks for socket properties */ node_template_properties_update(ntype); - NODE_TYPES_END + } NODE_TYPES_END; /* tree type icons */ ntreeType_Composite->ui_icon = ICON_RENDERLAYERS; diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index c45a5c650ee..6995744f235 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -473,8 +473,7 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname) } BLI_array_append(sorted_ntypes, ntype); - } - NODE_TYPES_END + } NODE_TYPES_END; qsort(sorted_ntypes, BLI_array_len(sorted_ntypes), sizeof(bNodeType *), ui_node_item_name_compare); -- cgit v1.2.3