diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-18 09:09:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-18 09:09:41 +0300 |
commit | ec2bbc90e7c6a7f21da253333a14d49ef1428319 (patch) | |
tree | 0ee36fb8e39593f29197d5fae17b885cc1a700e1 /source/blender/makesrna/intern/rna_define.c | |
parent | 54f9a6e5da06e671f7640c9ec3ac3c305644beb6 (diff) | |
parent | ab7ebf2b10f67b002447fb0e2cb352c2c178e128 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/makesrna/intern/rna_define.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 118dd0b15de..fd511655c5f 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -3284,17 +3284,17 @@ void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropert void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem) { - static EnumPropertyItem sepr = {0, "", 0, NULL, NULL}; + static const EnumPropertyItem sepr = {0, "", 0, NULL, NULL}; RNA_enum_item_add(items, totitem, &sepr); } -void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item) +void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item) { for (; item->identifier; item++) RNA_enum_item_add(items, totitem, item); } -void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item, int value) +void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value) { for (; item->identifier; item++) { if (item->value == value) { @@ -3308,7 +3308,7 @@ void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, EnumProper void RNA_enum_item_end(EnumPropertyItem **items, int *totitem) { - static EnumPropertyItem empty = {0, NULL, 0, NULL, NULL}; + static const EnumPropertyItem empty = {0, NULL, 0, NULL, NULL}; RNA_enum_item_add(items, totitem, &empty); } @@ -3425,12 +3425,12 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA eprop->item = earray; for (a = 0; a < eprop->totitem; a++) { - if (eprop->item[a].identifier) - eprop->item[a].identifier = BLI_strdup(eprop->item[a].identifier); - if (eprop->item[a].name) - eprop->item[a].name = BLI_strdup(eprop->item[a].name); - if (eprop->item[a].description) - eprop->item[a].description = BLI_strdup(eprop->item[a].description); + if (earray[a].identifier) + earray[a].identifier = BLI_strdup(earray[a].identifier); + if (earray[a].name) + earray[a].name = BLI_strdup(earray[a].name); + if (earray[a].description) + earray[a].description = BLI_strdup(earray[a].description); } } break; |