From ab7ebf2b10f67b002447fb0e2cb352c2c178e128 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 18 Oct 2017 15:07:26 +1100 Subject: Cleanup: Use const for RNA EnumPropertyItem args Practically all access to enum data is read-only. --- source/blender/editors/space_node/node_add.c | 2 +- source/blender/editors/space_node/node_edit.c | 4 ++-- source/blender/editors/space_node/node_group.c | 2 +- source/blender/editors/space_node/node_select.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/space_node') diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c index 1c11ee1f98c..ec35727d176 100644 --- a/source/blender/editors/space_node/node_add.c +++ b/source/blender/editors/space_node/node_add.c @@ -517,7 +517,7 @@ static int new_node_tree_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static EnumPropertyItem *new_node_tree_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) +static const EnumPropertyItem *new_node_tree_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { return rna_node_tree_type_itemf(NULL, NULL, r_free); } diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index b74735f8e02..e38b48d4bb8 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -1905,7 +1905,7 @@ static int node_output_file_move_active_socket_exec(bContext *C, wmOperator *op) void NODE_OT_output_file_move_active_socket(wmOperatorType *ot) { - static EnumPropertyItem direction_items[] = { + static const EnumPropertyItem direction_items[] = { {1, "UP", 0, "Up", ""}, {2, "DOWN", 0, "Down", ""}, { 0, NULL, 0, NULL, NULL } @@ -2273,7 +2273,7 @@ void NODE_OT_tree_socket_remove(wmOperatorType *ot) /********************** Move interface socket operator *********************/ -static EnumPropertyItem move_direction_items[] = { +static const EnumPropertyItem move_direction_items[] = { { 1, "UP", 0, "Up", "" }, { 2, "DOWN", 0, "Down", "" }, { 0, NULL, 0, NULL, NULL }, diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c index 9d750bfe348..7eaf35c6c4f 100644 --- a/source/blender/editors/space_node/node_group.c +++ b/source/blender/editors/space_node/node_group.c @@ -515,7 +515,7 @@ typedef enum eNodeGroupSeparateType { } eNodeGroupSeparateType; /* Operator Property */ -static EnumPropertyItem node_group_separate_types[] = { +static const EnumPropertyItem node_group_separate_types[] = { {NODE_GS_COPY, "COPY", 0, "Copy", "Copy to parent node tree, keep group intact"}, {NODE_GS_MOVE, "MOVE", 0, "Move", "Move to parent node tree, remove from group"}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index 0cff5f12dca..dc7863bb354 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -333,7 +333,7 @@ static int node_select_grouped_exec(bContext *C, wmOperator *op) void NODE_OT_select_grouped(wmOperatorType *ot) { - static EnumPropertyItem prop_select_grouped_types[] = { + static const EnumPropertyItem prop_select_grouped_types[] = { {NODE_SELECT_GROUPED_TYPE, "TYPE", 0, "Type", ""}, {NODE_SELECT_GROUPED_COLOR, "COLOR", 0, "Color", ""}, {NODE_SELECT_GROUPED_PREFIX, "PREFIX", 0, "Prefix", ""}, -- cgit v1.2.3