summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2022-09-23 20:08:02 -0400
committerGitHub <noreply@github.com>2022-09-23 20:08:02 -0400
commitc297474d87ff8fda965ebc33a3fb1d50b1ecb2af (patch)
tree89b236650e1c5af86cd3423a4f571f9c5d152471 /Source/Core/InputCommon
parent3fa9fdf57a546b37797e222b1dd290ccfc15fd1b (diff)
parent02a967f78625ce226c0590948d49f29d6e35ebe1 (diff)
Merge pull request #11085 from AdmiralCurtiss/tvec-equality
Add TVec and RawValue equality operators.
Diffstat (limited to 'Source/Core/InputCommon')
-rw-r--r--Source/Core/InputCommon/ControllerEmu/ControllerEmu.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h
index 32b755eb30..2db991eb82 100644
--- a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h
+++ b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.h
@@ -103,13 +103,15 @@ struct ThreePointCalibration
template <typename T, size_t Bits>
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;
T value;
+ constexpr bool operator==(const RawValue& other) const = default;
+
template <typename OtherT, size_t OtherBits>
auto GetNormalizedValue(const TwoPointCalibration<OtherT, OtherBits>& calibration) const
{