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-11-18 05:30:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-18 05:36:26 +0300
commit88512646c0bafa1e31abe41025fc8d837ad77583 (patch)
tree329b47400f76b91b31e6f90f10576506bc3306da /source/blender
parentd13edeaed4bf72cfc79f961375f44351db9952d0 (diff)
Cleanup: clarify precedence of operations
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c4
-rw-r--r--source/blender/editors/interface/interface_layout.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_mask.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 4117dfc0b23..35ff387c9a6 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -1418,7 +1418,7 @@ static void integrate_particle(
ParticleKey states[5];
float force[3], acceleration[3], impulse[3], dx[4][3] = ZERO_F43, dv[4][3] = ZERO_F43, oldpos[3];
- float pa_mass = (part->flag & PART_SIZEMASS ? part->mass * pa->size : part->mass);
+ float pa_mass = (part->flag & PART_SIZEMASS) ? (part->mass * pa->size) : part->mass;
int i, steps = 1;
int integrator = part->integrator;
@@ -2201,7 +2201,7 @@ static void sph_integrate(ParticleSimulationData *sim,
{
ParticleSettings *part = sim->psys->part;
// float timestep = psys_get_timestep(sim); // UNUSED
- float pa_mass = part->mass * (part->flag & PART_SIZEMASS ? pa->size : 1.0f);
+ float pa_mass = part->mass * ((part->flag & PART_SIZEMASS) ? pa->size : 1.0f);
float dtime = dfra * psys_get_timestep(sim);
// int steps = 1; // UNUSED
float effector_acceleration[3];
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index bd42e5db531..d61e80e6505 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -956,7 +956,7 @@ static uiBut *ui_item_with_label(uiLayout *layout,
#endif
const bool is_keymapitem_ptr = RNA_struct_is_a(ptr->type, &RNA_KeyMapItem);
- if ((flag & flag & UI_ITEM_R_FULL_EVENT) && !is_keymapitem_ptr) {
+ if ((flag & UI_ITEM_R_FULL_EVENT) && !is_keymapitem_ptr) {
RNA_warning("Data is not a keymap item struct: %s. Ignoring 'full_event' option.",
RNA_struct_identifier(ptr->type));
}
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c
index 4dd7ecb09ca..11d897cf76f 100644
--- a/source/blender/editors/sculpt_paint/paint_mask.c
+++ b/source/blender/editors/sculpt_paint/paint_mask.c
@@ -531,7 +531,7 @@ static SculptGestureContext *sculpt_gesture_init_from_line(bContext *C, wmOperat
sgcontext, line_points, plane_points, offset_plane_points);
/* Calculate line plane and normal. */
- const bool flip = sgcontext->line.flip ^ !sgcontext->vc.rv3d->is_persp;
+ const bool flip = sgcontext->line.flip ^ (!sgcontext->vc.rv3d->is_persp);
sculpt_gesture_line_plane_from_tri(sgcontext->line.true_plane,
sgcontext,
flip,