From ab9ece9bcab8a6d55dbe6f3a904d49231e5f73e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Tue, 26 Dec 2017 00:38:44 +0100 Subject: Replace MathUtil::Clamp with std::clamp --- Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp') diff --git a/Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp b/Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp index 8b885cad68..1cb76b2d25 100644 --- a/Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp +++ b/Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include #include #include #include @@ -15,7 +16,6 @@ #include #include "Common/FileUtil.h" -#include "Common/MathUtil.h" #include "Common/StringUtil.h" #include "InputCommon/ControllerInterface/ControllerInterface.h" #include "InputCommon/ControllerInterface/Pipes/Pipes.h" @@ -123,7 +123,7 @@ void PipeDevice::AddAxis(const std::string& name, double value) void PipeDevice::SetAxis(const std::string& entry, double value) { - value = MathUtil::Clamp(value, 0.0, 1.0); + value = std::clamp(value, 0.0, 1.0); double hi = std::max(0.0, value - 0.5) * 2.0; double lo = (0.5 - std::min(0.5, value)) * 2.0; auto search_hi = m_axes.find(entry + " +"); -- cgit v1.2.3