diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-09 01:35:37 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-09 02:13:43 +0300 |
commit | 21462565632b876ac4eadf2bd30573f2fda70c76 (patch) | |
tree | 483da4fc20c4c8cc7198abd6edd5f3a53aa90b91 /source/blender/makesrna/intern/makesrna.c | |
parent | 626c844105afc3b2455f5a1b87ac8a7839a7e0bf (diff) |
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 01a6108fd8c..20261fb9eeb 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -724,10 +724,10 @@ static char *rna_def_property_get_func( } else { const PropertySubType subtype = prop->subtype; - const char *string_copy_func = (subtype == PROP_FILEPATH || subtype == PROP_DIRPATH || - subtype == PROP_FILENAME || subtype == PROP_BYTESTRING) ? - "BLI_strncpy" : - "BLI_strncpy_utf8"; + const char *string_copy_func = + ELEM(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME, PROP_BYTESTRING) ? + "BLI_strncpy" : + "BLI_strncpy_utf8"; rna_print_data_get(f, dp); @@ -1073,10 +1073,10 @@ static char *rna_def_property_set_func( } else { const PropertySubType subtype = prop->subtype; - const char *string_copy_func = (subtype == PROP_FILEPATH || subtype == PROP_DIRPATH || - subtype == PROP_FILENAME || subtype == PROP_BYTESTRING) ? - "BLI_strncpy" : - "BLI_strncpy_utf8"; + const char *string_copy_func = + ELEM(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME, PROP_BYTESTRING) ? + "BLI_strncpy" : + "BLI_strncpy_utf8"; rna_print_data_get(f, dp); |