diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-07-23 02:04:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-07-23 02:04:07 +0400 |
commit | 5b4a3b56d2dd1968b062f3dc17535e535fd86bad (patch) | |
tree | e1b71a3e63d6ecf6d761399ca1dc751e99445fe7 | |
parent | 3a042d205321574838b08fcfe99aa2d97fc4bc97 (diff) |
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.
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 6 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index fd9df0e1bbb..5a27af9cf5f 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -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); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 3faba35485e..5efcfa22517 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -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; |