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/makesrna/intern/rna_internal_types.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna/intern/rna_internal_types.h') diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h index a470c807091..59f68cdf106 100644 --- a/source/blender/makesrna/intern/rna_internal_types.h +++ b/source/blender/makesrna/intern/rna_internal_types.h @@ -88,8 +88,9 @@ typedef int (*PropStringLengthFunc)(struct PointerRNA *ptr); typedef void (*PropStringSetFunc)(struct PointerRNA *ptr, const char *value); typedef int (*PropEnumGetFunc)(struct PointerRNA *ptr); typedef void (*PropEnumSetFunc)(struct PointerRNA *ptr, int value); -typedef EnumPropertyItem *(*PropEnumItemFunc)(struct bContext *C, struct PointerRNA *ptr, - struct PropertyRNA *prop, bool *r_free); +typedef const EnumPropertyItem *(*PropEnumItemFunc)( + struct bContext *C, struct PointerRNA *ptr, + struct PropertyRNA *prop, bool *r_free); typedef PointerRNA (*PropPointerGetFunc)(struct PointerRNA *ptr); typedef StructRNA *(*PropPointerTypeFunc)(struct PointerRNA *ptr); typedef void (*PropPointerSetFunc)(struct PointerRNA *ptr, const PointerRNA value); @@ -316,7 +317,7 @@ typedef struct EnumPropertyRNA { PropEnumSetFuncEx set_ex; void *py_data; /* store py callback here */ - EnumPropertyItem *item; + const EnumPropertyItem *item; int totitem; int defaultvalue; -- cgit v1.2.3