From 87dba476fb2b6f03b24ce9d65ae0f88db6f3d156 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 18 Dec 2019 11:32:26 +1100 Subject: Cleanup: use ELEM macro --- source/blender/makesrna/intern/rna_particle.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/makesrna/intern/rna_particle.c') diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index b65ef1bdda2..f3ca10e332a 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -952,14 +952,14 @@ static float rna_PartSetting_linelenhead_get(struct PointerRNA *ptr) static int rna_PartSettings_is_fluid_get(PointerRNA *ptr) { - ParticleSettings *part = (ParticleSettings *)ptr->data; - - if (part->type == PART_FLUID || part->type == PART_FLUID_FLIP || part->type == PART_FLUID_FOAM || - part->type == PART_FLUID_SPRAY || part->type == PART_FLUID_BUBBLE || - part->type == PART_FLUID_TRACER) { - return true; - } - return false; + ParticleSettings *part = ptr->data; + return (ELEM(part->type, + PART_FLUID, + PART_FLUID_FLIP, + PART_FLUID_FOAM, + PART_FLUID_SPRAY, + PART_FLUID_BUBBLE, + PART_FLUID_TRACER)); } static void rna_ParticleSettings_use_clump_curve_update(Main *bmain, Scene *scene, PointerRNA *ptr) -- cgit v1.2.3