summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/sunmouse
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2021-08-15 21:29:39 -0400
committer AJR <ajrhacker@users.noreply.github.com>2021-08-15 21:32:53 -0400
commit0298e5d6c376f5df0cefe1b9a84840eba39f0ebc (patch)
tree719da5f05bade2379610254ce842e0896ed0bd71 /src/devices/bus/sunmouse
parent08a0e5af5be40da3b97302d85961f32ddee2bd54 (diff)
Use std::clamp in more source files
Diffstat (limited to 'src/devices/bus/sunmouse')
-rw-r--r--src/devices/bus/sunmouse/hlemouse.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/bus/sunmouse/hlemouse.cpp b/src/devices/bus/sunmouse/hlemouse.cpp
index e3d11558f75..97bae888600 100644
--- a/src/devices/bus/sunmouse/hlemouse.cpp
+++ b/src/devices/bus/sunmouse/hlemouse.cpp
@@ -53,7 +53,7 @@ INPUT_PORTS_END
uint8_t extract_delta_byte(int32_t &delta)
{
- int32_t const result(std::min<int32_t>(std::max<int32_t>(delta, -120), 127));
+ int32_t const result(std::clamp<int32_t>(delta, -120, 127));
delta -= result;
return uint8_t(int8_t(result));
}