From 24a1fe32f1a6c2b83afd9933af4f22e24380f1b7 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Sat, 24 Sep 2022 00:48:26 +0200 Subject: InputCommon: Make RawValue constructors constexpr. --- Source/Core/InputCommon/ControllerEmu/ControllerEmu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/InputCommon') diff --git a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h index 32b755eb30..6b6329cc4f 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h +++ b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h @@ -103,8 +103,8 @@ struct ThreePointCalibration template struct RawValue { - RawValue() = default; - explicit RawValue(const T& value_) : value{value_} {} + constexpr RawValue() = default; + constexpr explicit RawValue(const T& value_) : value{value_} {} static constexpr size_t BITS_OF_PRECISION = Bits; -- cgit v1.2.3 From 02a967f78625ce226c0590948d49f29d6e35ebe1 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Sat, 24 Sep 2022 00:48:47 +0200 Subject: InputCommon: Add equality operators to RawValue. --- Source/Core/InputCommon/ControllerEmu/ControllerEmu.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Core/InputCommon') diff --git a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h index 6b6329cc4f..2db991eb82 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h +++ b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h @@ -110,6 +110,8 @@ struct RawValue T value; + constexpr bool operator==(const RawValue& other) const = default; + template auto GetNormalizedValue(const TwoPointCalibration& calibration) const { -- cgit v1.2.3