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 <campbell@blender.org>2022-03-09 01:35:37 +0300
committerCampbell Barton <campbell@blender.org>2022-03-09 02:13:43 +0300
commit21462565632b876ac4eadf2bd30573f2fda70c76 (patch)
tree483da4fc20c4c8cc7198abd6edd5f3a53aa90b91 /source/blender/makesrna/intern/makesrna.c
parent626c844105afc3b2455f5a1b87ac8a7839a7e0bf (diff)
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r--source/blender/makesrna/intern/makesrna.c16
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);