diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-26 20:56:25 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-26 21:10:13 +0200 |
commit | d4d799cac8080d4066394f338c31611ae655d5f6 (patch) | |
tree | ff37ab02c0bc8aaf30f44ad4c217527df74a774f /proto-mouse | |
parent | cecd3f8a89693c5722b5e52baebb58edaef1a91c (diff) |
compat: use std::clamp, remove own version
Diffstat (limited to 'proto-mouse')
-rw-r--r-- | proto-mouse/ftnoir_protocol_mouse.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/proto-mouse/ftnoir_protocol_mouse.cpp b/proto-mouse/ftnoir_protocol_mouse.cpp index aed49f2b..e5b2192b 100644 --- a/proto-mouse/ftnoir_protocol_mouse.cpp +++ b/proto-mouse/ftnoir_protocol_mouse.cpp @@ -31,12 +31,12 @@ void mouse::pose(const double* headpose, const double*) int mouse_x = 0, mouse_y = 0; - if (axis_x == clamp(axis_x, Axis_MIN, Axis_MAX)) + if (axis_x == std::clamp(axis_x, (int)Axis_MIN, (int)Axis_MAX)) mouse_x = get_value(headpose[axis_x] * invert[axis_x], *s.sensitivity_x, axis_x >= 3); - if (axis_y == clamp(axis_y, Axis_MIN, Axis_MAX)) + if (axis_y == std::clamp(axis_y, (int)Axis_MIN, (int)Axis_MAX)) mouse_y = get_value(headpose[axis_y] * invert[axis_y], *s.sensitivity_y, axis_y >= 3); |