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/makesrna/intern/rna_wm.c | |
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/makesrna/intern/rna_wm.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index f46e4a0e7a6..1cb1397a0ed 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -2139,13 +2139,13 @@ static void rna_def_event(BlenderRNA *brna) /* mouse */ prop = RNA_def_property(srna, "mouse_x", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "x"); + RNA_def_property_int_sdna(prop, NULL, "xy[0]"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text( prop, "Mouse X Position", "The window relative horizontal location of the mouse"); prop = RNA_def_property(srna, "mouse_y", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "y"); + RNA_def_property_int_sdna(prop, NULL, "xy[1]"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text( prop, "Mouse Y Position", "The window relative vertical location of the mouse"); @@ -2163,13 +2163,13 @@ static void rna_def_event(BlenderRNA *brna) prop, "Mouse Y Position", "The region relative vertical location of the mouse"); prop = RNA_def_property(srna, "mouse_prev_x", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "prevx"); + RNA_def_property_int_sdna(prop, NULL, "prev_xy[0]"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text( prop, "Mouse Previous X Position", "The window relative horizontal location of the mouse"); prop = RNA_def_property(srna, "mouse_prev_y", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "prevy"); + RNA_def_property_int_sdna(prop, NULL, "prev_xy[1]"); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text( prop, "Mouse Previous Y Position", "The window relative vertical location of the mouse"); |