[Bf-blender-cvs] [87dba476fb2] master: Cleanup: use ELEM macro

Campbell Barton noreply at git.blender.org
Wed Dec 18 01:34:48 CET 2019


Commit: 87dba476fb2b6f03b24ce9d65ae0f88db6f3d156
Author: Campbell Barton
Date:   Wed Dec 18 11:32:26 2019 +1100
Branches: master
https://developer.blender.org/rB87dba476fb2b6f03b24ce9d65ae0f88db6f3d156

Cleanup: use ELEM macro

===================================================================

M	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)



More information about the Bf-blender-cvs mailing list