From 5297bf318e6f18c9165c9968728e6c9d27f8ae3c Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Thu, 21 Oct 2021 00:56:31 -0400 Subject: 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 --- source/blender/editors/interface/interface_handlers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/interface/interface_handlers.c') diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 556474f6df4..8ec97c1df10 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2079,8 +2079,8 @@ static bool ui_but_drag_init(bContext *C, drag_info->pushed_state = ui_drag_toggle_but_pushed_state(but); drag_info->but_cent_start[0] = BLI_rctf_cent_x(&but->rect); drag_info->but_cent_start[1] = BLI_rctf_cent_y(&but->rect); - copy_v2_v2_int(drag_info->xy_init, &event->xy[0]); - copy_v2_v2_int(drag_info->xy_last, &event->xy[0]); + copy_v2_v2_int(drag_info->xy_init, event->xy); + copy_v2_v2_int(drag_info->xy_last, event->xy); /* needed for toggle drag on popups */ region_prev = CTX_wm_region(C); @@ -9915,7 +9915,7 @@ static bool ui_mouse_motion_towards_check(uiBlock *block, static void ui_mouse_motion_keynav_init(struct uiKeyNavLock *keynav, const wmEvent *event) { keynav->is_keynav = true; - copy_v2_v2_int(keynav->event_xy, &event->xy[0]); + copy_v2_v2_int(keynav->event_xy, &event->xy); } /** * Return true if key-input isn't blocking mouse-motion, -- cgit v1.2.3