diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-18 07:07:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-18 08:04:07 +0300 |
commit | ab7ebf2b10f67b002447fb0e2cb352c2c178e128 (patch) | |
tree | 8ca38116cf22d8a5e8c6b788f93a84ba1963cb4c /source/blender/editors/space_outliner | |
parent | 92611dada67fcc151c894462749031be1de27191 (diff) |
Cleanup: Use const for RNA EnumPropertyItem args
Practically all access to enum data is read-only.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index f4089667b04..fc7c70ba89e 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -482,7 +482,7 @@ static int outliner_id_remap_invoke(bContext *C, wmOperator *op, const wmEvent * return WM_operator_props_dialog_popup(C, op, 200, 100); } -static EnumPropertyItem *outliner_id_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) +static const EnumPropertyItem *outliner_id_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { EnumPropertyItem item_tmp = {0}, *item = NULL; int totitem = 0; diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 29dcf73109c..86b58537f18 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -278,7 +278,7 @@ typedef enum eOutliner_PropSceneOps { OL_SCENE_OP_DELETE = 1 } eOutliner_PropSceneOps; -static EnumPropertyItem prop_scene_op_types[] = { +static const EnumPropertyItem prop_scene_op_types[] = { {OL_SCENE_OP_DELETE, "DELETE", ICON_X, "Delete", ""}, {0, NULL, 0, NULL, NULL} }; @@ -906,7 +906,7 @@ enum { OL_OP_RENAME, }; -static EnumPropertyItem prop_object_op_types[] = { +static const EnumPropertyItem prop_object_op_types[] = { {OL_OP_SELECT, "SELECT", 0, "Select", ""}, {OL_OP_DESELECT, "DESELECT", 0, "Deselect", ""}, {OL_OP_SELECT_HIERARCHY, "SELECT_HIERARCHY", 0, "Select Hierarchy", ""}, @@ -1053,7 +1053,7 @@ typedef enum eOutliner_PropGroupOps { OL_GROUPOP_RENAME, } eOutliner_PropGroupOps; -static EnumPropertyItem prop_group_op_types[] = { +static const EnumPropertyItem prop_group_op_types[] = { {OL_GROUPOP_UNLINK, "UNLINK", 0, "Unlink Group", ""}, {OL_GROUPOP_LOCAL, "LOCAL", 0, "Make Local Group", ""}, {OL_GROUPOP_LINK, "LINK", 0, "Link Group Objects to Scene", ""}, @@ -1160,7 +1160,7 @@ typedef enum eOutlinerIdOpTypes { } eOutlinerIdOpTypes; // TODO: implement support for changing the ID-block used -static EnumPropertyItem prop_id_op_types[] = { +static const EnumPropertyItem prop_id_op_types[] = { {OUTLINER_IDOP_UNLINK, "UNLINK", 0, "Unlink", ""}, {OUTLINER_IDOP_LOCAL, "LOCAL", 0, "Make Local", ""}, {OUTLINER_IDOP_SINGLE, "SINGLE", 0, "Make Single User", ""}, @@ -1347,7 +1347,7 @@ typedef enum eOutlinerLibOpTypes { OL_LIB_RELOAD, } eOutlinerLibOpTypes; -static EnumPropertyItem outliner_lib_op_type_items[] = { +static const EnumPropertyItem outliner_lib_op_type_items[] = { {OL_LIB_RENAME, "RENAME", 0, "Rename", ""}, {OL_LIB_DELETE, "DELETE", 0, "Delete", "Delete this library and all its item from Blender - WARNING: no undo"}, {OL_LIB_RELOCATE, "RELOCATE", 0, "Relocate", "Select a new path for this library, and reload all its data"}, @@ -1557,7 +1557,7 @@ typedef enum eOutliner_AnimDataOps { //OUTLINER_ANIMOP_PASTE_DRIVERS } eOutliner_AnimDataOps; -static EnumPropertyItem prop_animdata_op_types[] = { +static const EnumPropertyItem prop_animdata_op_types[] = { {OUTLINER_ANIMOP_CLEAR_ADT, "CLEAR_ANIMDATA", 0, "Clear Animation Data", "Remove this animation data container"}, {OUTLINER_ANIMOP_SET_ACT, "SET_ACT", 0, "Set Action", ""}, {OUTLINER_ANIMOP_CLEAR_ACT, "CLEAR_ACT", 0, "Unlink Action", ""}, @@ -1657,7 +1657,7 @@ void OUTLINER_OT_animdata_operation(wmOperatorType *ot) /* **************************************** */ -static EnumPropertyItem prop_constraint_op_types[] = { +static const EnumPropertyItem prop_constraint_op_types[] = { {OL_CONSTRAINTOP_ENABLE, "ENABLE", ICON_RESTRICT_VIEW_OFF, "Enable", ""}, {OL_CONSTRAINTOP_DISABLE, "DISABLE", ICON_RESTRICT_VIEW_ON, "Disable", ""}, {OL_CONSTRAINTOP_DELETE, "DELETE", ICON_X, "Delete", ""}, @@ -1703,7 +1703,7 @@ void OUTLINER_OT_constraint_operation(wmOperatorType *ot) /* ******************** */ -static EnumPropertyItem prop_modifier_op_types[] = { +static const EnumPropertyItem prop_modifier_op_types[] = { {OL_MODIFIER_OP_TOGVIS, "TOGVIS", ICON_RESTRICT_VIEW_OFF, "Toggle viewport use", ""}, {OL_MODIFIER_OP_TOGREN, "TOGREN", ICON_RESTRICT_RENDER_OFF, "Toggle render use", ""}, {OL_MODIFIER_OP_DELETE, "DELETE", ICON_X, "Delete", ""}, @@ -1750,7 +1750,7 @@ void OUTLINER_OT_modifier_operation(wmOperatorType *ot) /* ******************** */ // XXX: select linked is for RNA structs only -static EnumPropertyItem prop_data_op_types[] = { +static const EnumPropertyItem prop_data_op_types[] = { {OL_DOP_SELECT, "SELECT", 0, "Select", ""}, {OL_DOP_DESELECT, "DESELECT", 0, "Deselect", ""}, {OL_DOP_HIDE, "HIDE", 0, "Hide", ""}, |