diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2021-10-20 15:45:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-20 16:00:01 +0300 |
commit | 2743d746ea4f38c098512f6dd6fc33d5a62429d3 (patch) | |
tree | 0680f3c4713b7ecd698b91c5d1298734fc55f7ff /source/blender/editors/space_file | |
parent | 3435ea014d42d1e223513f448cbdaba63864115c (diff) |
Cleanup: use an array for wmEvent cursor position variables
Use arrays for wmEvent coordinates, this quiets warnings with GCC11.
- `x, y` -> `xy`.
- `prevx, prevy` -> `prev_xy`.
- `prevclickx, prevclicky` -> `prev_click_xy`.
There is still some cleanup such as using `copy_v2_v2_int()`,
this can be done separately.
Reviewed By: campbellbarton, Severin
Ref D12901
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index d0f2a4fdc4c..f647e1d4e4f 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -1449,7 +1449,7 @@ static int file_highlight_invoke(bContext *C, wmOperator *UNUSED(op), const wmEv ARegion *region = CTX_wm_region(C); SpaceFile *sfile = CTX_wm_space_file(C); - if (!file_highlight_set(sfile, region, event->x, event->y)) { + if (!file_highlight_set(sfile, region, event->xy[0], event->xy[1])) { return OPERATOR_PASS_THROUGH; } diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 2587c8f7f1f..b93f9b34f3b 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -654,7 +654,7 @@ static void file_main_region_draw(const bContext *C, ARegion *region) /* on first read, find active file */ if (params->highlight_file == -1) { wmEvent *event = CTX_wm_window(C)->eventstate; - file_highlight_set(sfile, region, event->x, event->y); + file_highlight_set(sfile, region, event->xy[0], event->xy[1]); } if (!file_draw_hint_if_invalid(sfile, region)) { |