Cleanup: clarify precedence of operations

This commit is contained in:
Campbell Barton 2020-11-18 13:30:30 +11:00
parent d13edeaed4
commit 88512646c0
3 changed files with 4 additions and 4 deletions

View File

@ -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];

View File

@ -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));
}

View File

@ -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,