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 <ideasman42@gmail.com>2020-04-05 06:53:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-04-05 06:53:32 +0300
commit9fe0505db00f450333518238db6813ede046f45e (patch)
treef8d3feec11659a545aac2b419a223120dfafea1d /source/blender/blenkernel/BKE_rigidbody.h
parent93806ba82b30683f3e459f0c77ea9b162e1287ec (diff)
Cleanup: macro hygiene, parenthesize arguments
Diffstat (limited to 'source/blender/blenkernel/BKE_rigidbody.h')
-rw-r--r--source/blender/blenkernel/BKE_rigidbody.h12
1 files changed, 6 insertions, 6 deletions
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))
/* -------------- */