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/object/object_add.c | 6 +++--- source/blender/editors/object/object_constraint.c | 2 +- .../blender/editors/object/object_data_transfer.c | 10 +++++----- source/blender/editors/object/object_edit.c | 11 ++++++----- source/blender/editors/object/object_group.c | 2 +- source/blender/editors/object/object_hook.c | 2 +- source/blender/editors/object/object_lattice.c | 2 +- source/blender/editors/object/object_modifier.c | 10 ++++++---- source/blender/editors/object/object_relations.c | 12 ++++++------ source/blender/editors/object/object_select.c | 6 +++--- source/blender/editors/object/object_shapekey.c | 2 +- source/blender/editors/object/object_transform.c | 4 ++-- source/blender/editors/object/object_vgroup.c | 21 +++++++++++---------- 13 files changed, 47 insertions(+), 43 deletions(-) (limited to 'source/blender/editors/object') diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index a0bb5ce3fc9..7b17db020e6 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -120,7 +120,7 @@ /* this is an exact copy of the define in rna_lamp.c * kept here because of linking order. * Icons are only defined here */ -EnumPropertyItem rna_enum_lamp_type_items[] = { +const EnumPropertyItem rna_enum_lamp_type_items[] = { {LA_LOCAL, "POINT", ICON_LAMP_POINT, "Point", "Omnidirectional point light source"}, {LA_SUN, "SUN", ICON_LAMP_SUN, "Sun", "Constant direction parallel ray light source"}, {LA_SPOT, "SPOT", ICON_LAMP_SPOT, "Spot", "Directional cone light source"}, @@ -130,7 +130,7 @@ EnumPropertyItem rna_enum_lamp_type_items[] = { }; /* copy from rna_object_force.c */ -static EnumPropertyItem field_type_items[] = { +static const EnumPropertyItem field_type_items[] = { {PFIELD_FORCE, "FORCE", ICON_FORCE_FORCE, "Force", ""}, {PFIELD_WIND, "WIND", ICON_FORCE_WIND, "Wind", ""}, {PFIELD_VORTEX, "VORTEX", ICON_FORCE_VORTEX, "Vortex", ""}, @@ -1547,7 +1547,7 @@ void OBJECT_OT_duplicates_make_real(wmOperatorType *ot) /**************************** Convert **************************/ -static EnumPropertyItem convert_target_items[] = { +static const EnumPropertyItem convert_target_items[] = { {OB_CURVE, "CURVE", ICON_OUTLINER_OB_CURVE, "Curve from Mesh/Text", ""}, {OB_MESH, "MESH", ICON_OUTLINER_OB_MESH, "Mesh from Curve/Meta/Surf/Text", ""}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index f348806c6f1..59b5906258c 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -570,7 +570,7 @@ static void object_test_constraint(Object *owner, bConstraint *con) #define EDIT_CONSTRAINT_OWNER_OBJECT 0 #define EDIT_CONSTRAINT_OWNER_BONE 1 -static EnumPropertyItem constraint_owner_items[] = { +static const EnumPropertyItem constraint_owner_items[] = { {EDIT_CONSTRAINT_OWNER_OBJECT, "OBJECT", 0, "Object", "Edit a constraint on the active object"}, {EDIT_CONSTRAINT_OWNER_BONE, "BONE", 0, "Bone", "Edit a constraint on the active bone"}, {0, NULL, 0, NULL, NULL}}; diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c index acee69daab7..89100125848 100644 --- a/source/blender/editors/object/object_data_transfer.c +++ b/source/blender/editors/object/object_data_transfer.c @@ -63,7 +63,7 @@ /* All possible data to transfer. * Note some are 'fake' ones, i.e. they are not hold by real CDLayers. */ /* Not shared with modifier, since we use a usual enum here, not a multi-choice one. */ -static EnumPropertyItem DT_layer_items[] = { +static const EnumPropertyItem DT_layer_items[] = { {0, "", 0, "Vertex Data", ""}, {DT_TYPE_MDEFORMVERT, "VGROUP_WEIGHTS", 0, "Vertex Group(s)", "Transfer active or all vertex groups"}, #if 0 /* XXX For now, would like to finish/merge work from 2014 gsoc first. */ @@ -90,7 +90,7 @@ static EnumPropertyItem DT_layer_items[] = { }; /* Note: rna_enum_dt_layers_select_src_items enum is from rna_modifier.c */ -static EnumPropertyItem *dt_layers_select_src_itemf( +static const EnumPropertyItem *dt_layers_select_src_itemf( bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { EnumPropertyItem *item = NULL, tmp_item = {0}; @@ -183,7 +183,7 @@ static EnumPropertyItem *dt_layers_select_src_itemf( } /* Note: rna_enum_dt_layers_select_dst_items enum is from rna_modifier.c */ -static EnumPropertyItem *dt_layers_select_dst_itemf( +static const EnumPropertyItem *dt_layers_select_dst_itemf( bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { EnumPropertyItem *item = NULL; @@ -209,7 +209,7 @@ static EnumPropertyItem *dt_layers_select_dst_itemf( return item; } -static EnumPropertyItem *dt_layers_select_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free) +static const EnumPropertyItem *dt_layers_select_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free) { const bool reverse_transfer = RNA_boolean_get(ptr, "use_reverse_transfer"); @@ -230,7 +230,7 @@ static EnumPropertyItem *dt_layers_select_itemf(bContext *C, PointerRNA *ptr, Pr } /* Note: rna_enum_dt_mix_mode_items enum is from rna_modifier.c */ -static EnumPropertyItem *dt_mix_mode_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) +static const EnumPropertyItem *dt_mix_mode_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { EnumPropertyItem *item = NULL; int totitem = 0; diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 76a9d7d22a6..4fbe242fcaa 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1574,9 +1574,10 @@ static void UNUSED_FUNCTION(image_aspect) (Scene *scene, View3D *v3d) } -static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) +static const EnumPropertyItem *object_mode_set_itemsf( + bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { - EnumPropertyItem *input = rna_enum_object_mode_items; + const EnumPropertyItem *input = rna_enum_object_mode_items; EnumPropertyItem *item = NULL; Object *ob; bGPdata *gpd; @@ -1939,7 +1940,7 @@ static int game_property_move(bContext *C, wmOperator *op) void OBJECT_OT_game_property_move(wmOperatorType *ot) { - static EnumPropertyItem direction_property_move[] = { + static const EnumPropertyItem direction_property_move[] = { {GAME_PROPERTY_MOVE_UP, "UP", 0, "Up", ""}, {GAME_PROPERTY_MOVE_DOWN, "DOWN", 0, "Down", ""}, {0, NULL, 0, NULL, NULL} @@ -1972,14 +1973,14 @@ void OBJECT_OT_game_property_move(wmOperatorType *ot) #define COPY_PROPERTIES_MERGE 2 #define COPY_PROPERTIES_COPY 3 -static EnumPropertyItem game_properties_copy_operations[] = { +static const EnumPropertyItem game_properties_copy_operations[] = { {COPY_PROPERTIES_REPLACE, "REPLACE", 0, "Replace Properties", ""}, {COPY_PROPERTIES_MERGE, "MERGE", 0, "Merge Properties", ""}, {COPY_PROPERTIES_COPY, "COPY", 0, "Copy a Property", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem *gameprops_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) +static const EnumPropertyItem *gameprops_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { Object *ob = ED_object_active_context(C); EnumPropertyItem tmp = {0, "", 0, "", ""}; diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c index 568778c0a86..46c2c4e4b7d 100644 --- a/source/blender/editors/object/object_group.c +++ b/source/blender/editors/object/object_group.c @@ -63,7 +63,7 @@ /********************* 3d view operators ***********************/ /* can be called with C == NULL */ -static EnumPropertyItem *group_object_active_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) +static const EnumPropertyItem *group_object_active_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { Object *ob; EnumPropertyItem *item = NULL, item_tmp = {0}; diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index 438c10c51fa..42e3a4a6837 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -661,7 +661,7 @@ static int object_hook_remove_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static EnumPropertyItem *hook_mod_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) +static const EnumPropertyItem *hook_mod_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { Object *ob = CTX_data_edit_object(C); EnumPropertyItem tmp = {0, "", 0, "", ""}; diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c index 73ce1fae605..ac8d438d9e6 100644 --- a/source/blender/editors/object/object_lattice.c +++ b/source/blender/editors/object/object_lattice.c @@ -819,7 +819,7 @@ static int lattice_flip_exec(bContext *C, wmOperator *op) void LATTICE_OT_flip(wmOperatorType *ot) { - static EnumPropertyItem flip_items[] = { + static const EnumPropertyItem flip_items[] = { {LATTICE_FLIP_U, "U", 0, "U (X) Axis", ""}, {LATTICE_FLIP_V, "V", 0, "V (Y) Axis", ""}, {LATTICE_FLIP_W, "W", 0, "W (Z) Axis", ""}, diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 1aa1407797b..048884a500e 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -744,10 +744,12 @@ static int modifier_add_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) +static const EnumPropertyItem *modifier_add_itemf( + bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { Object *ob = ED_object_active_context(C); - EnumPropertyItem *item = NULL, *md_item, *group_item = NULL; + EnumPropertyItem *item = NULL; + const EnumPropertyItem *md_item, *group_item = NULL; const ModifierTypeInfo *mti; int totitem = 0, a; @@ -1019,7 +1021,7 @@ static int modifier_apply_invoke(bContext *C, wmOperator *op, const wmEvent *UNU return OPERATOR_CANCELLED; } -static EnumPropertyItem modifier_apply_as_items[] = { +static const EnumPropertyItem modifier_apply_as_items[] = { {MODIFIER_APPLY_DATA, "DATA", 0, "Object Data", "Apply modifier to the object's data"}, {MODIFIER_APPLY_SHAPE, "SHAPE", 0, "New Shape", "Apply deform-only modifier to a new shape on this object"}, {0, NULL, 0, NULL, NULL} @@ -1573,7 +1575,7 @@ static int skin_loose_mark_clear_exec(bContext *C, wmOperator *op) void OBJECT_OT_skin_loose_mark_clear(wmOperatorType *ot) { - static EnumPropertyItem action_items[] = { + static const EnumPropertyItem action_items[] = { {SKIN_LOOSE_MARK, "MARK", 0, "Mark", "Mark selected vertices as loose"}, {SKIN_LOOSE_CLEAR, "CLEAR", 0, "Clear", "Set selected vertices as not loose"}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 91fdfcacf6c..eba01b7ec8a 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -380,7 +380,7 @@ static int make_proxy_exec(bContext *C, wmOperator *op) } /* Generic itemf's for operators that take library args */ -static EnumPropertyItem *proxy_group_object_itemf(bContext *C, PointerRNA *UNUSED(ptr), +static const EnumPropertyItem *proxy_group_object_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { EnumPropertyItem item_tmp = {0}, *item = NULL; @@ -1124,7 +1124,7 @@ enum { CLEAR_TRACK_KEEP_TRANSFORM = 2, }; -static EnumPropertyItem prop_clear_track_types[] = { +static const EnumPropertyItem prop_clear_track_types[] = { {CLEAR_TRACK, "CLEAR", 0, "Clear Track", ""}, {CLEAR_TRACK_KEEP_TRANSFORM, "CLEAR_KEEP_TRANSFORM", 0, "Clear and Keep Transformation (Clear Track)", ""}, {0, NULL, 0, NULL, NULL} @@ -1193,7 +1193,7 @@ enum { CREATE_TRACK_LOCKTRACK = 3, }; -static EnumPropertyItem prop_make_track_types[] = { +static const EnumPropertyItem prop_make_track_types[] = { {CREATE_TRACK_DAMPTRACK, "DAMPTRACK", 0, "Damped Track Constraint", ""}, {CREATE_TRACK_TRACKTO, "TRACKTO", 0, "Track To Constraint", ""}, {CREATE_TRACK_LOCKTRACK, "LOCKTRACK", 0, "Lock Track Constraint", ""}, @@ -1705,7 +1705,7 @@ void OBJECT_OT_make_links_scene(wmOperatorType *ot) void OBJECT_OT_make_links_data(wmOperatorType *ot) { - static EnumPropertyItem make_links_items[] = { + static const EnumPropertyItem make_links_items[] = { {MAKE_LINKS_OBDATA, "OBDATA", 0, "Object Data", ""}, {MAKE_LINKS_MATERIALS, "MATERIAL", 0, "Materials", ""}, {MAKE_LINKS_ANIMDATA, "ANIMATION", 0, "Animation Data", ""}, @@ -2377,7 +2377,7 @@ static int make_local_exec(bContext *C, wmOperator *op) void OBJECT_OT_make_local(wmOperatorType *ot) { - static EnumPropertyItem type_items[] = { + static const EnumPropertyItem type_items[] = { {MAKE_LOCAL_SELECT_OB, "SELECT_OBJECT", 0, "Selected Objects", ""}, {MAKE_LOCAL_SELECT_OBDATA, "SELECT_OBDATA", 0, "Selected Objects and Data", ""}, {MAKE_LOCAL_SELECT_OBDATA_MATERIAL, "SELECT_OBDATA_MATERIAL", 0, "Selected Objects, Data and Materials", ""}, @@ -2452,7 +2452,7 @@ static int make_single_user_exec(bContext *C, wmOperator *op) void OBJECT_OT_make_single_user(wmOperatorType *ot) { - static EnumPropertyItem type_items[] = { + static const EnumPropertyItem type_items[] = { {MAKE_SINGLE_USER_SELECTED, "SELECTED_OBJECTS", 0, "Selected Objects", ""}, {MAKE_SINGLE_USER_ALL, "ALL", 0, "All", ""}, {0, NULL, 0, NULL, NULL}}; diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index b5131df3eaa..8d5c2387fe9 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -198,7 +198,7 @@ enum { OBJECT_SELECT_LINKED_LIBRARY_OBDATA }; -static EnumPropertyItem prop_select_linked_types[] = { +static const EnumPropertyItem prop_select_linked_types[] = { //{OBJECT_SELECT_LINKED_IPO, "IPO", 0, "Object IPO", ""}, // XXX deprecated animation system stuff... {OBJECT_SELECT_LINKED_OBDATA, "OBDATA", 0, "Object Data", ""}, {OBJECT_SELECT_LINKED_MATERIAL, "MATERIAL", 0, "Material", ""}, @@ -527,7 +527,7 @@ enum { OBJECT_GRPSEL_LAMP_TYPE = 12, }; -static EnumPropertyItem prop_select_grouped_types[] = { +static const EnumPropertyItem prop_select_grouped_types[] = { {OBJECT_GRPSEL_CHILDREN_RECURSIVE, "CHILDREN_RECURSIVE", 0, "Children", ""}, {OBJECT_GRPSEL_CHILDREN, "CHILDREN", 0, "Immediate Children", ""}, {OBJECT_GRPSEL_PARENT, "PARENT", 0, "Parent", ""}, @@ -982,7 +982,7 @@ static int object_select_by_layer_exec(bContext *C, wmOperator *op) void OBJECT_OT_select_by_layer(wmOperatorType *ot) { - static EnumPropertyItem match_items[] = { + static const EnumPropertyItem match_items[] = { {OB_SEL_LAYERMATCH_EXACT, "EXACT", 0, "Exact Match", ""}, {OB_SEL_LAYERMATCH_SHARED, "SHARED", 0, "Shared Layers", ""}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c index e04114761e4..6cede87958f 100644 --- a/source/blender/editors/object/object_shapekey.c +++ b/source/blender/editors/object/object_shapekey.c @@ -477,7 +477,7 @@ static int shape_key_move_exec(bContext *C, wmOperator *op) void OBJECT_OT_shape_key_move(wmOperatorType *ot) { - static EnumPropertyItem slot_move[] = { + static const EnumPropertyItem slot_move[] = { {KB_MOVE_TOP, "TOP", 0, "Top", "Top of the list"}, {KB_MOVE_UP, "UP", 0, "Up", ""}, {KB_MOVE_DOWN, "DOWN", 0, "Down", ""}, diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 6491da4c23c..f9e58462e57 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -1094,7 +1094,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) void OBJECT_OT_origin_set(wmOperatorType *ot) { - static EnumPropertyItem prop_set_center_types[] = { + static const EnumPropertyItem prop_set_center_types[] = { {GEOMETRY_TO_ORIGIN, "GEOMETRY_ORIGIN", 0, "Geometry to Origin", "Move object geometry to object origin"}, {ORIGIN_TO_GEOMETRY, "ORIGIN_GEOMETRY", 0, "Origin to Geometry", "Calculate the center of geometry based on the current pivot point (median, otherwise bounding-box)"}, @@ -1108,7 +1108,7 @@ void OBJECT_OT_origin_set(wmOperatorType *ot) {0, NULL, 0, NULL, NULL} }; - static EnumPropertyItem prop_set_bounds_types[] = { + static const EnumPropertyItem prop_set_bounds_types[] = { {V3D_AROUND_CENTER_MEAN, "MEDIAN", 0, "Median Center", ""}, {V3D_AROUND_CENTER_BOUNDS, "BOUNDS", 0, "Bounds Center", ""}, {0, NULL, 0, NULL, NULL} diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 584176e4b5d..6e7ae58da81 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -666,7 +666,7 @@ static void vgroup_copy_active_to_sel(Object *ob, eVGroupSelect subset_type) /***********************Start weight transfer (WT)*********************************/ -static EnumPropertyItem WT_vertex_group_select_item[] = { +static const EnumPropertyItem WT_vertex_group_select_item[] = { {WT_VGROUP_ACTIVE, "ACTIVE", 0, "Active Group", "The active Vertex Group"}, {WT_VGROUP_BONE_SELECT, @@ -678,7 +678,7 @@ static EnumPropertyItem WT_vertex_group_select_item[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem *ED_object_vgroup_selection_itemf_helper( +const EnumPropertyItem *ED_object_vgroup_selection_itemf_helper( const bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free, const unsigned int selection_mask) { @@ -686,9 +686,10 @@ EnumPropertyItem *ED_object_vgroup_selection_itemf_helper( EnumPropertyItem *item = NULL; int totitem = 0; - - if (!C) /* needed for docs and i18n tools */ + if (C == NULL) { + /* needed for docs and i18n tools */ return WT_vertex_group_select_item; + } ob = CTX_data_active_object(C); if (selection_mask & (1 << WT_VGROUP_ACTIVE)) @@ -710,13 +711,13 @@ EnumPropertyItem *ED_object_vgroup_selection_itemf_helper( return item; } -static EnumPropertyItem *rna_vertex_group_with_single_itemf(bContext *C, PointerRNA *ptr, +static const EnumPropertyItem *rna_vertex_group_with_single_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free) { return ED_object_vgroup_selection_itemf_helper(C, ptr, prop, r_free, WT_VGROUP_MASK_ALL); } -static EnumPropertyItem *rna_vertex_group_select_itemf(bContext *C, PointerRNA *ptr, +static const EnumPropertyItem *rna_vertex_group_select_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free) { return ED_object_vgroup_selection_itemf_helper(C, ptr, prop, r_free, WT_VGROUP_MASK_ALL & ~(1 << WT_VGROUP_ACTIVE)); @@ -1623,7 +1624,7 @@ enum { VGROUP_INVERT }; -static EnumPropertyItem vgroup_lock_actions[] = { +static const EnumPropertyItem vgroup_lock_actions[] = { {VGROUP_TOGGLE, "TOGGLE", 0, "Toggle", "Unlock all vertex groups if there is at least one locked group, lock all in other case"}, {VGROUP_LOCK, "LOCK", 0, "Lock", "Lock all vertex groups"}, {VGROUP_UNLOCK, "UNLOCK", 0, "Unlock", "Unlock all vertex groups"}, @@ -3415,7 +3416,7 @@ static int set_active_group_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) +static const EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) { Object *ob = ED_object_context(C); EnumPropertyItem tmp = {0, "", 0, "", ""}; @@ -3634,7 +3635,7 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_sort(wmOperatorType *ot) { - static EnumPropertyItem vgroup_sort_type[] = { + static const EnumPropertyItem vgroup_sort_type[] = { {SORT_TYPE_NAME, "NAME", 0, "Name", ""}, {SORT_TYPE_BONEHIERARCHY, "BONE_HIERARCHY", 0, "Bone Hierarchy", ""}, {0, NULL, 0, NULL, NULL} @@ -3685,7 +3686,7 @@ static int vgroup_move_exec(bContext *C, wmOperator *op) void OBJECT_OT_vertex_group_move(wmOperatorType *ot) { - static EnumPropertyItem vgroup_slot_move[] = { + static const EnumPropertyItem vgroup_slot_move[] = { {-1, "UP", 0, "Up", ""}, {1, "DOWN", 0, "Down", ""}, {0, NULL, 0, NULL, NULL} -- cgit v1.2.3