diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-06-06 16:04:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-06-07 08:49:50 +0300 |
commit | e17a90074f116ac652c4f05b94ab7290db96ad15 (patch) | |
tree | d345d7c5f89538182e939e7ca28ba0fd7d658aa4 /source/blender | |
parent | 7f01329a84a6c8e90988e38cab7dd7f070d06795 (diff) |
WM: remove unused return values
Diffstat (limited to 'source/blender')
7 files changed, 10 insertions, 26 deletions
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 14a1a6b8cfe..ec2bb0893ee 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -1117,7 +1117,7 @@ static ManipulatorGroup *manipulatorgroup_init(wmManipulatorGroup *wgroup) /** * Custom handler for manipulator widgets */ -static int manipulator_handler( +static void manipulator_handler( bContext *C, wmManipulator *widget, const wmEvent *UNUSED(event), const int UNUSED(flag)) { const ScrArea *sa = CTX_wm_area(C); @@ -1131,8 +1131,6 @@ static int manipulator_handler( } ED_region_tag_redraw(ar); - - return OPERATOR_PASS_THROUGH; } static void WIDGETGROUP_manipulator_init(const bContext *UNUSED(C), wmManipulatorGroup *wgroup) diff --git a/source/blender/windowmanager/manipulators/intern/manipulator_library/arrow2d_manipulator.c b/source/blender/windowmanager/manipulators/intern/manipulator_library/arrow2d_manipulator.c index b3287ce8735..106e1f97990 100644 --- a/source/blender/windowmanager/manipulators/intern/manipulator_library/arrow2d_manipulator.c +++ b/source/blender/windowmanager/manipulators/intern/manipulator_library/arrow2d_manipulator.c @@ -127,15 +127,13 @@ static void manipulator_arrow2d_draw(const bContext *UNUSED(C), struct wmManipul } } -static int manipulator_arrow2d_invoke( +static void manipulator_arrow2d_invoke( bContext *UNUSED(C), struct wmManipulator *manipulator, const wmEvent *UNUSED(event)) { ManipulatorInteraction *inter = MEM_callocN(sizeof(ManipulatorInteraction), __func__); copy_v2_v2(inter->init_origin, manipulator->origin); manipulator->interaction_data = inter; - - return OPERATOR_RUNNING_MODAL; } static int manipulator_arrow2d_intersect( diff --git a/source/blender/windowmanager/manipulators/intern/manipulator_library/arrow_manipulator.c b/source/blender/windowmanager/manipulators/intern/manipulator_library/arrow_manipulator.c index 02060db736a..bbfe17485cf 100644 --- a/source/blender/windowmanager/manipulators/intern/manipulator_library/arrow_manipulator.c +++ b/source/blender/windowmanager/manipulators/intern/manipulator_library/arrow_manipulator.c @@ -256,7 +256,7 @@ static void manipulator_arrow_draw(const bContext *UNUSED(C), wmManipulator *man * Calculate arrow offset independent from prop min value, * meaning the range will not be offset by min value first. */ -static int manipulator_arrow_handler(bContext *C, wmManipulator *manipulator, const wmEvent *event, const int flag) +static void manipulator_arrow_handler(bContext *C, wmManipulator *manipulator, const wmEvent *event, const int flag) { ArrowManipulator *arrow = (ArrowManipulator *)manipulator; ManipulatorInteraction *inter = manipulator->interaction_data; @@ -366,12 +366,10 @@ static int manipulator_arrow_handler(bContext *C, wmManipulator *manipulator, co /* tag the region for redraw */ ED_region_tag_redraw(ar); WM_event_add_mousemove(C); - - return OPERATOR_PASS_THROUGH; } -static int manipulator_arrow_invoke( +static void manipulator_arrow_invoke( bContext *UNUSED(C), wmManipulator *manipulator, const wmEvent *event) { ArrowManipulator *arrow = (ArrowManipulator *)manipulator; @@ -393,8 +391,6 @@ static int manipulator_arrow_invoke( manipulator_arrow_get_final_pos(manipulator, inter->init_origin); manipulator->interaction_data = inter; - - return OPERATOR_RUNNING_MODAL; } static void manipulator_arrow_prop_data_update(wmManipulator *manipulator, const int slot) diff --git a/source/blender/windowmanager/manipulators/intern/manipulator_library/cage_manipulator.c b/source/blender/windowmanager/manipulators/intern/manipulator_library/cage_manipulator.c index e4bc80bb791..c89633cf0fa 100644 --- a/source/blender/windowmanager/manipulators/intern/manipulator_library/cage_manipulator.c +++ b/source/blender/windowmanager/manipulators/intern/manipulator_library/cage_manipulator.c @@ -398,7 +398,7 @@ static bool manipulator_rect_transform_get_prop_value(wmManipulator *manipulator return true; } -static int manipulator_rect_transform_invoke( +static void manipulator_rect_transform_invoke( bContext *UNUSED(C), wmManipulator *manipulator, const wmEvent *event) { RectTransformManipulator *cage = (RectTransformManipulator *)manipulator; @@ -411,11 +411,9 @@ static int manipulator_rect_transform_invoke( data->orig_mouse[1] = event->mval[1]; manipulator->interaction_data = data; - - return OPERATOR_RUNNING_MODAL; } -static int manipulator_rect_transform_handler( +static void manipulator_rect_transform_handler( bContext *C, wmManipulator *manipulator, const wmEvent *event, const int UNUSED(flag)) { @@ -505,8 +503,6 @@ static int manipulator_rect_transform_handler( /* tag the region for redraw */ ED_region_tag_redraw(CTX_wm_region(C)); - - return OPERATOR_PASS_THROUGH; } static void manipulator_rect_transform_prop_data_update(wmManipulator *manipulator, const int slot) diff --git a/source/blender/windowmanager/manipulators/intern/manipulator_library/dial_manipulator.c b/source/blender/windowmanager/manipulators/intern/manipulator_library/dial_manipulator.c index 58391b374f5..0f4467f16ed 100644 --- a/source/blender/windowmanager/manipulators/intern/manipulator_library/dial_manipulator.c +++ b/source/blender/windowmanager/manipulators/intern/manipulator_library/dial_manipulator.c @@ -315,7 +315,7 @@ static void manipulator_dial_draw(const bContext *C, wmManipulator *manipulator) } } -static int manipulator_dial_invoke( +static void manipulator_dial_invoke( bContext *UNUSED(C), wmManipulator *manipulator, const wmEvent *event) { DialInteraction *inter = MEM_callocN(sizeof(DialInteraction), __func__); @@ -324,8 +324,6 @@ static int manipulator_dial_invoke( inter->init_mval[1] = event->mval[1]; manipulator->interaction_data = inter; - - return OPERATOR_RUNNING_MODAL; } diff --git a/source/blender/windowmanager/manipulators/intern/manipulator_library/primitive_manipulator.c b/source/blender/windowmanager/manipulators/intern/manipulator_library/primitive_manipulator.c index e27cdf1c3bf..0c27e739fe7 100644 --- a/source/blender/windowmanager/manipulators/intern/manipulator_library/primitive_manipulator.c +++ b/source/blender/windowmanager/manipulators/intern/manipulator_library/primitive_manipulator.c @@ -174,7 +174,7 @@ static void manipulator_primitive_draw(const bContext *UNUSED(C), wmManipulator (manipulator->state & WM_MANIPULATOR_HIGHLIGHT)); } -static int manipulator_primitive_invoke( +static void manipulator_primitive_invoke( bContext *UNUSED(C), wmManipulator *manipulator, const wmEvent *UNUSED(event)) { ManipulatorInteraction *inter = MEM_callocN(sizeof(ManipulatorInteraction), __func__); @@ -183,8 +183,6 @@ static int manipulator_primitive_invoke( inter->init_scale = manipulator->scale; manipulator->interaction_data = inter; - - return OPERATOR_RUNNING_MODAL; } diff --git a/source/blender/windowmanager/manipulators/wm_manipulator_fn.h b/source/blender/windowmanager/manipulators/wm_manipulator_fn.h index b2676d79646..308ba09ee71 100644 --- a/source/blender/windowmanager/manipulators/wm_manipulator_fn.h +++ b/source/blender/windowmanager/manipulators/wm_manipulator_fn.h @@ -39,10 +39,10 @@ typedef void (*wmManipulatorGroupFnDrawPrepare)(const struct bContext *, struct typedef void (*wmManipulatorFnDraw)(const struct bContext *, struct wmManipulator *); typedef void (*wmManipulatorFnDrawSelect)(const struct bContext *, struct wmManipulator *, int); typedef int (*wmManipulatorFnIntersect)(struct bContext *, struct wmManipulator *, const struct wmEvent *); -typedef int (*wmManipulatorFnHandler)(struct bContext *, struct wmManipulator *, const struct wmEvent *, const int); +typedef void (*wmManipulatorFnHandler)(struct bContext *, struct wmManipulator *, const struct wmEvent *, const int); typedef void (*wmManipulatorFnPropDataUpdate)(struct wmManipulator *, int); typedef void (*wmManipulatorFnFinalPositionGet)(struct wmManipulator *, float[]); -typedef int (*wmManipulatorFnInvoke)(struct bContext *, struct wmManipulator *, const struct wmEvent *); +typedef void (*wmManipulatorFnInvoke)(struct bContext *, struct wmManipulator *, const struct wmEvent *); typedef void (*wmManipulatorFnExit)(struct bContext *, struct wmManipulator *, const bool); typedef int (*wmManipulatorFnCursorGet)(struct wmManipulator *); typedef void (*wmManipulatorFnSelect)(struct bContext *, struct wmManipulator *, const int); |