Cleanup: redundant self assignment

This commit is contained in:
Campbell Barton 2020-06-24 14:29:29 +10:00
parent 1daaac75b5
commit be8f2c698e
3 changed files with 9 additions and 9 deletions

View File

@ -3794,8 +3794,8 @@ static void BKE_fluid_modifier_processDomain(FluidModifierData *mmd,
int next_frame = scene_framenr + 1;
int prev_frame = scene_framenr - 1;
/* Ensure positivity of previous frame. */
CLAMP(prev_frame, mds->cache_frame_start, prev_frame);
/* Ensure positive of previous frame. */
CLAMP_MIN(prev_frame, mds->cache_frame_start);
int data_frame = scene_framenr, noise_frame = scene_framenr;
int mesh_frame = scene_framenr, particles_frame = scene_framenr, guide_frame = scene_framenr;
@ -3902,10 +3902,10 @@ static void BKE_fluid_modifier_processDomain(FluidModifierData *mmd,
}
/* Noise, mesh and particles can never be baked more than data. */
CLAMP(noise_frame, noise_frame, data_frame);
CLAMP(mesh_frame, mesh_frame, data_frame);
CLAMP(particles_frame, particles_frame, data_frame);
CLAMP(guide_frame, guide_frame, mds->cache_frame_end);
CLAMP_MAX(noise_frame, data_frame);
CLAMP_MAX(mesh_frame, data_frame);
CLAMP_MAX(particles_frame, data_frame);
CLAMP_MAX(guide_frame, mds->cache_frame_end);
/* Force to read cache as we're resuming the bake */
read_cache = true;

View File

@ -434,7 +434,7 @@ static int gp_vertexpaint_set_exec(bContext *C, wmOperator *op)
Object *ob = CTX_data_active_object(C);
bGPdata *gpd = (bGPdata *)ob->data;
Paint *paint = &ts->gp_vertexpaint->paint;
Brush *brush = brush = paint->brush;
Brush *brush = paint->brush;
bool changed = false;
int i;

View File

@ -1452,8 +1452,8 @@ void UI_view2d_scrollers_calc(View2D *v2d,
vert.xmax -= smaller;
}
CLAMP(vert.ymin, vert.ymin, vert.ymax - V2D_SCROLL_HANDLE_SIZE_HOTSPOT);
CLAMP(hor.xmin, hor.xmin, hor.xmax - V2D_SCROLL_HANDLE_SIZE_HOTSPOT);
CLAMP_MAX(vert.ymin, vert.ymax - V2D_SCROLL_HANDLE_SIZE_HOTSPOT);
CLAMP_MAX(hor.xmin, hor.xmax - V2D_SCROLL_HANDLE_SIZE_HOTSPOT);
/* store in scrollers, used for drawing */
r_scrollers->vert = vert;