From d71c423c28d82b00b0c67349fe0b0e6e098bd3d9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 21 Oct 2021 16:44:07 +1100 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/screen/screen_ops.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/screen') diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 80ad35b8d8f..e5fbcbb0b6c 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -1060,7 +1060,7 @@ static void actionzone_apply(bContext *C, wmOperator *op, int type) static int actionzone_invoke(bContext *C, wmOperator *op, const wmEvent *event) { bScreen *screen = CTX_wm_screen(C); - AZone *az = screen_actionzone_find_xy(screen, &event->xy[0]); + AZone *az = screen_actionzone_find_xy(screen, event->xy); /* Quick escape - Scroll azones only hide/unhide the scroll-bars, * they have their own handling. */ @@ -3632,7 +3632,7 @@ static int screen_area_options_invoke(bContext *C, wmOperator *op, const wmEvent 0, &ptr); /* store initial mouse cursor position. */ - RNA_int_set_array(&ptr, "cursor", &event->xy[0]); + RNA_int_set_array(&ptr, "cursor", event->xy); RNA_enum_set(&ptr, "direction", SCREEN_AXIS_V); /* Horizontal Split */ @@ -3645,7 +3645,7 @@ static int screen_area_options_invoke(bContext *C, wmOperator *op, const wmEvent 0, &ptr); /* store initial mouse cursor position. */ - RNA_int_set_array(&ptr, "cursor", &event->xy[0]); + RNA_int_set_array(&ptr, "cursor", event->xy); RNA_enum_set(&ptr, "direction", SCREEN_AXIS_H); if (sa1 && sa2) { @@ -3662,7 +3662,7 @@ static int screen_area_options_invoke(bContext *C, wmOperator *op, const wmEvent WM_OP_INVOKE_DEFAULT, 0, &ptr); - RNA_int_set_array(&ptr, "cursor", &event->xy[0]); + RNA_int_set_array(&ptr, "cursor", event->xy); } /* Swap just needs two areas. */ @@ -3675,7 +3675,7 @@ static int screen_area_options_invoke(bContext *C, wmOperator *op, const wmEvent WM_OP_EXEC_DEFAULT, 0, &ptr); - RNA_int_set_array(&ptr, "cursor", &event->xy[0]); + RNA_int_set_array(&ptr, "cursor", event->xy); } UI_popup_menu_end(C, pup); -- cgit v1.2.3