diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-31 03:08:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-31 03:08:53 +0400 |
commit | 7267221715d8431bd1aaaaa3ace4f8c0ce151627 (patch) | |
tree | 65f85d299db27f35ec67330e58864f1dcf088687 /source/blender/editors/sculpt_paint | |
parent | bced18155ffc525dc513d097245fe3954acbb900 (diff) |
remove return argument from wmOperatorType->cancel, was only ever returning OPERATOR_CANCELLED.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
6 files changed, 14 insertions, 20 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 9e8a8fd3ecc..003db8a9c43 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -898,10 +898,9 @@ static int grab_clone_modal(bContext *C, wmOperator *op, const wmEvent *event) return OPERATOR_RUNNING_MODAL; } -static int grab_clone_cancel(bContext *UNUSED(C), wmOperator *op) +static void grab_clone_cancel(bContext *UNUSED(C), wmOperator *op) { MEM_freeN(op->customdata); - return OPERATOR_CANCELLED; } void PAINT_OT_grab_clone(wmOperatorType *ot) diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h index f276e6823e2..5fff02f016b 100644 --- a/source/blender/editors/sculpt_paint/paint_intern.h +++ b/source/blender/editors/sculpt_paint/paint_intern.h @@ -80,7 +80,7 @@ bool paint_supports_jitter(enum PaintMode mode); struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf); int paint_stroke_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); int paint_stroke_exec(struct bContext *C, struct wmOperator *op); -int paint_stroke_cancel(struct bContext *C, struct wmOperator *op); +void paint_stroke_cancel(struct bContext *C, struct wmOperator *op); struct ViewContext *paint_stroke_view_context(struct PaintStroke *stroke); void *paint_stroke_mode_data(struct PaintStroke *stroke); void paint_stroke_set_mode_data(struct PaintStroke *stroke, void *mode_data); diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 03c063692c6..55ea0363b7a 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -613,13 +613,12 @@ static void stencil_restore(StencilControlData *scd) *scd->rot_target = scd->init_rot; } -static int stencil_control_cancel(bContext *UNUSED(C), wmOperator *op) +static void stencil_control_cancel(bContext *UNUSED(C), wmOperator *op) { StencilControlData *scd = op->customdata; stencil_restore(scd); MEM_freeN(op->customdata); - return OPERATOR_CANCELLED; } static void stencil_control_calculate(StencilControlData *scd, const int mval[2]) diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index b00b1c3ecff..397baeae4c9 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -718,10 +718,13 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event) /* Cancel */ if (event->type == EVT_MODAL_MAP && event->val == PAINT_STROKE_MODAL_CANCEL) { - if (op->type->cancel) - return op->type->cancel(C, op); - else - return paint_stroke_cancel(C, op); + if (op->type->cancel) { + op->type->cancel(C, op); + } + else { + paint_stroke_cancel(C, op); + } + return OPERATOR_CANCELLED; } if (event->type == stroke->event_type && event->val == KM_RELEASE && !first_modal) { @@ -787,10 +790,9 @@ int paint_stroke_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -int paint_stroke_cancel(bContext *C, wmOperator *op) +void paint_stroke_cancel(bContext *C, wmOperator *op) { stroke_done(C, op); - return OPERATOR_CANCELLED; } ViewContext *paint_stroke_view_context(PaintStroke *stroke) diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 1c3caf5d8bc..db71ca1a93e 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2593,11 +2593,9 @@ static int wpaint_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int wpaint_cancel(bContext *C, wmOperator *op) +static void wpaint_cancel(bContext *C, wmOperator *op) { paint_stroke_cancel(C, op); - - return OPERATOR_CANCELLED; } void PAINT_OT_weight_paint(wmOperatorType *ot) @@ -3144,11 +3142,9 @@ static int vpaint_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int vpaint_cancel(bContext *C, wmOperator *op) +static void vpaint_cancel(bContext *C, wmOperator *op) { paint_stroke_cancel(C, op); - - return OPERATOR_CANCELLED; } void PAINT_OT_vertex_paint(wmOperatorType *ot) diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 488504b71f8..6bd935af436 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -4567,7 +4567,7 @@ static int sculpt_brush_stroke_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int sculpt_brush_stroke_cancel(bContext *C, wmOperator *op) +static void sculpt_brush_stroke_cancel(bContext *C, wmOperator *op) { Object *ob = CTX_data_active_object(C); SculptSession *ss = ob->sculpt; @@ -4585,8 +4585,6 @@ static int sculpt_brush_stroke_cancel(bContext *C, wmOperator *op) } sculpt_brush_exit_tex(sd); - - return OPERATOR_CANCELLED; } static void SCULPT_OT_brush_stroke(wmOperatorType *ot) |