Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-10-18 07:07:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-18 08:04:07 +0300
commitab7ebf2b10f67b002447fb0e2cb352c2c178e128 (patch)
tree8ca38116cf22d8a5e8c6b788f93a84ba1963cb4c /source/blender/editors/util
parent92611dada67fcc151c894462749031be1de27191 (diff)
Cleanup: Use const for RNA EnumPropertyItem args
Practically all access to enum data is read-only.
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/undo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 419c15bf83f..95b5c2c1e48 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -532,7 +532,7 @@ static int get_undo_system(bContext *C)
}
/* create enum based on undo items */
-static EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem)
+static const EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem)
{
EnumPropertyItem item_tmp = {0}, *item = NULL;
int i = 0;
@@ -585,7 +585,7 @@ static int undo_history_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
undosys = get_undo_system(C);
if (undosys) {
- EnumPropertyItem *item = rna_undo_itemf(C, undosys, &totitem);
+ const EnumPropertyItem *item = rna_undo_itemf(C, undosys, &totitem);
if (totitem > 0) {
uiPopupMenu *pup = UI_popup_menu_begin(C, RNA_struct_ui_name(op->type->srna), ICON_NONE);
@@ -608,7 +608,7 @@ static int undo_history_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
}
}
- MEM_freeN(item);
+ MEM_freeN((void *)item);
UI_popup_menu_end(C, pup);
}