diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-21 08:44:07 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-21 08:57:53 +0300 |
commit | d71c423c28d82b00b0c67349fe0b0e6e098bd3d9 (patch) | |
tree | a7dd8371d3d81075877ee191de2fc954098bed8d /source/blender/editors/interface/interface_handlers.c | |
parent | 3a2b7f35f4693dd40cd9457a0e6cd43b760ec558 (diff) |
Cleanup: Use array as a parameter for event x/y functions
This change simplifies the parameter list for these functions
and reduces the chance of typos mixing up array indices.
Missed in rB69102786047dccdcbaee0df6307a8c3364d28fe0.
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 2dbdbc56342..205c25d562a 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -9451,7 +9451,7 @@ static int ui_list_activate_hovered_row(bContext *C, } } - const int *mouse_xy = ISTWEAK(event->type) ? &event->prev_click_xy[0] : &event->xy[0]; + const int *mouse_xy = ISTWEAK(event->type) ? event->prev_click_xy : event->xy; uiBut *listrow = ui_list_row_find_mouse_over(region, mouse_xy); if (listrow) { wmOperatorType *custom_activate_optype = ui_list->dyn_data->custom_activate_optype; @@ -9478,7 +9478,7 @@ static bool ui_list_is_hovering_draggable_but(bContext *C, const wmEvent *event) { /* On a tweak event, uses the coordinates from where tweaking was started. */ - const int *mouse_xy = ISTWEAK(event->type) ? &event->prev_click_xy[0] : &event->xy[0]; + const int *mouse_xy = ISTWEAK(event->type) ? event->prev_click_xy : event->xy; const uiBut *hovered_but = ui_but_find_mouse_over_ex(region, mouse_xy, false, NULL, NULL); if (list->dyn_data->custom_drag_optype) { |