minor warning fix

brush_alpha was being converted to an int not a float, if this is intentional it should be delared 'const int', but looks like it wasnt.
This commit is contained in:
Campbell Barton 2010-07-22 22:04:07 +00:00
parent 3a042d2053
commit 5b4a3b56d2
2 changed files with 4 additions and 4 deletions

@ -77,7 +77,7 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op)
{
Paint *paint= paint_get_active(CTX_data_scene(C));
Brush *brush= paint_brush(paint);
Object *ob= CTX_data_active_object(C);
// Object *ob= CTX_data_active_object(C);
float scalar= RNA_float_get(op->ptr, "scalar");
if (brush) {
@ -86,14 +86,14 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op)
const int old_size= brush_size(brush);
int size= (int)(scalar*old_size);
if (old_size == size)
if (old_size == size) {
if (scalar > 1) {
size++;
}
else if (scalar < 1) {
size--;
}
}
CLAMP(size, 1, 2000); // XXX magic number
brush_set_size(brush, size);

@ -589,7 +589,7 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather)
Brush *brush = paint_brush(&sd->paint);
/* Primary strength input; square it to make lower values more sensitive */
const root_alpha = brush_alpha(brush);
const float root_alpha = brush_alpha(brush);
float alpha = root_alpha*root_alpha;
float dir = brush->flag & BRUSH_DIR_IN ? -1 : 1;
float pressure = brush_use_alpha_pressure(brush) ? cache->pressure : 1;