From 9fe0505db00f450333518238db6813ede046f45e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 5 Apr 2020 13:53:24 +1000 Subject: Cleanup: macro hygiene, parenthesize arguments --- source/blender/blenkernel/BKE_rigidbody.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/blenkernel/BKE_rigidbody.h') diff --git a/source/blender/blenkernel/BKE_rigidbody.h b/source/blender/blenkernel/BKE_rigidbody.h index 9d4d53bf27f..b4aa0ac2b93 100644 --- a/source/blender/blenkernel/BKE_rigidbody.h +++ b/source/blender/blenkernel/BKE_rigidbody.h @@ -121,16 +121,16 @@ void BKE_rigidbody_remove_constraint(struct Main *bmain, /* get mass of Rigid Body Object to supply to RigidBody simulators */ #define RBO_GET_MASS(rbo) \ - ((rbo && ((rbo->type == RBO_TYPE_PASSIVE) || (rbo->flag & RBO_FLAG_KINEMATIC) || \ - (rbo->flag & RBO_FLAG_DISABLED))) ? \ + (((rbo) && (((rbo)->type == RBO_TYPE_PASSIVE) || ((rbo)->flag & RBO_FLAG_KINEMATIC) || \ + ((rbo)->flag & RBO_FLAG_DISABLED))) ? \ (0.0f) : \ - (rbo->mass)) + ((rbo)->mass)) /* Get collision margin for Rigid Body Object, triangle mesh and cone shapes cannot embed margin, * convex hull always uses custom margin. */ #define RBO_GET_MARGIN(rbo) \ - ((rbo->flag & RBO_FLAG_USE_MARGIN || rbo->shape == RB_SHAPE_CONVEXH || \ - rbo->shape == RB_SHAPE_TRIMESH || rbo->shape == RB_SHAPE_CONE) ? \ - (rbo->margin) : \ + (((rbo)->flag & RBO_FLAG_USE_MARGIN || (rbo)->shape == RB_SHAPE_CONVEXH || \ + (rbo)->shape == RB_SHAPE_TRIMESH || (rbo)->shape == RB_SHAPE_CONE) ? \ + ((rbo)->margin) : \ (0.04f)) /* -------------- */ -- cgit v1.2.3