diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:30:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:32:54 +0300 |
commit | aa3a4973a30ff668a62447e18ac41f6c916b4a8b (patch) | |
tree | 1b24cc55995ba8b3d72aaabd9400a3e1e030d540 /source/blender/makesrna | |
parent | 7cb20d841da16d0bffb63154403267500e9941f5 (diff) |
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index e193aa78353..876dba432d2 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -578,7 +578,7 @@ static int rna_enum_bitmask(PropertyRNA *prop) static int rna_color_quantize(PropertyRNA *prop, PropertyDefRNA *dp) { return ((prop->type == PROP_FLOAT) && - (prop->subtype == PROP_COLOR || prop->subtype == PROP_COLOR_GAMMA) && + (ELEM(prop->subtype, PROP_COLOR, PROP_COLOR_GAMMA)) && (IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0)); } @@ -671,7 +671,7 @@ static char *rna_def_property_get_func( return NULL; } } - else if (prop->type == PROP_INT || prop->type == PROP_ENUM) { + else if (ELEM(prop->type, PROP_INT, PROP_ENUM)) { if (IS_DNATYPE_INT_COMPAT(dp->dnatype) == 0) { CLOG_ERROR(&LOG, "%s.%s is a '%s' but wrapped as type '%s'.", diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index c31d170113d..b298d49fad5 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -1407,7 +1407,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, /* a priori not raw editable */ prop->rawtype = -1; - if (type != PROP_COLLECTION && type != PROP_POINTER) { + if (!ELEM(type, PROP_COLLECTION, PROP_POINTER)) { prop->flag = PROP_EDITABLE; if (type != PROP_STRING) { |