Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Carlisle <carlisle.b3d@gmail.com>2021-10-20 15:45:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-20 16:00:01 +0300
commit2743d746ea4f38c098512f6dd6fc33d5a62429d3 (patch)
tree0680f3c4713b7ecd698b91c5d1298734fc55f7ff /source/blender/editors/armature
parent3435ea014d42d1e223513f448cbdaba63864115c (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/armature')
-rw-r--r--source/blender/editors/armature/pose_lib_2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/armature/pose_lib_2.c b/source/blender/editors/armature/pose_lib_2.c
index 91a5dc67a21..328ca0265c1 100644
--- a/source/blender/editors/armature/pose_lib_2.c
+++ b/source/blender/editors/armature/pose_lib_2.c
@@ -209,11 +209,11 @@ static void poselib_slide_mouse_update_blendfactor(PoseBlendData *pbd, const wmE
if (pbd->release_confirm_info.use_release_confirm) {
/* Release confirm calculates factor based on where the dragging was started from. */
const float range = 300 * U.pixelsize;
- const float new_factor = (event->x - pbd->release_confirm_info.drag_start_xy[0]) / range;
+ const float new_factor = (event->xy[0] - pbd->release_confirm_info.drag_start_xy[0]) / range;
poselib_blend_set_factor(pbd, new_factor);
}
else {
- const float new_factor = (event->x - pbd->area->v1->vec.x) / ((float)pbd->area->winx);
+ const float new_factor = (event->xy[0] - pbd->area->v1->vec.x) / ((float)pbd->area->winx);
poselib_blend_set_factor(pbd, new_factor);
}
}
@@ -379,8 +379,8 @@ static bool poselib_blend_init_data(bContext *C, wmOperator *op, const wmEvent *
if (pbd->release_confirm_info.use_release_confirm) {
BLI_assert(event != NULL);
- pbd->release_confirm_info.drag_start_xy[0] = event->x;
- pbd->release_confirm_info.drag_start_xy[1] = event->y;
+ pbd->release_confirm_info.drag_start_xy[0] = event->xy[0];
+ pbd->release_confirm_info.drag_start_xy[1] = event->xy[1];
pbd->release_confirm_info.init_event_type = WM_userdef_event_type_from_keymap_type(
event->type);
}