summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2019-05-05 10:24:18 +0200
committerGitHub <noreply@github.com>2019-05-05 10:24:18 +0200
commit5d52b6ff095a4f8285ae757745ab0285bad47b9e (patch)
treeac4904dfb02322a55dd7e5a2d7cdedf756f8eaf6 /Source/Core/InputCommon/ControllerInterface
parent99a4ca8de7111c8554b50217744e24bc71912cfe (diff)
parent9133e8f1befbebd87c6e61f0e454f3ae2754285a (diff)
Merge pull request #6273 from leoetlino/c++17
Enable C++17
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp4
-rw-r--r--Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp1
2 files changed, 3 insertions, 2 deletions
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 <algorithm>
#include <array>
#include <cstdlib>
#include <fcntl.h>
@@ -15,7 +16,6 @@
#include <vector>
#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 + " +");
diff --git a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp
index f84f3b01c6..da1e5fc918 100644
--- a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp
@@ -2,6 +2,7 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
+#include <algorithm>
#include <cstring>
#include <fcntl.h>
#include <libudev.h>