From 4f47cccd9f46ca848f7a2923d3429d2b1dc21265 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 8 Feb 2020 18:21:14 -0600 Subject: Cleanup: Use std::abs instead of abs. --- Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp') diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp index ff27eedf44..633950cc2d 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp @@ -310,6 +310,6 @@ ControlState Joystick::Hat::GetState() const if (is_centered) return 0; - return (abs((int)(m_hat / 4500 - m_direction * 2 + 8) % 8 - 4) > 2); + return (std::abs(int(m_hat / 4500 - m_direction * 2 + 8) % 8 - 4) > 2); } } // namespace ciface::DInput -- cgit v1.2.3