summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2015-09-03 19:44:42 -0400
committerLioncash <mathew1800@gmail.com>2015-09-03 19:44:42 -0400
commit4fd060ba11fc91adde87404c982f534732d9b072 (patch)
tree37c99caf9b1bc6e519939bc606ab4f4fec770c36 /Source
parentf83f3cf594f0ee494d4c4e93611c5ef039715f07 (diff)
Core: Use constexpr for default pad and attachment radius
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/HW/GCPadEmu.cpp3
-rw-r--r--Source/Core/Core/HW/GCPadEmu.h4
-rw-r--r--Source/Core/Core/HW/WiimoteEmu/Attachment/Attachment.cpp3
-rw-r--r--Source/Core/Core/HW/WiimoteEmu/Attachment/Attachment.h5
4 files changed, 3 insertions, 12 deletions
diff --git a/Source/Core/Core/HW/GCPadEmu.cpp b/Source/Core/Core/HW/GCPadEmu.cpp
index 0190a38d09..ff760c1310 100644
--- a/Source/Core/Core/HW/GCPadEmu.cpp
+++ b/Source/Core/Core/HW/GCPadEmu.cpp
@@ -5,9 +5,6 @@
#include "Core/Host.h"
#include "Core/HW/GCPadEmu.h"
-// TODO: Move to header file when VS supports constexpr.
-const ControlState GCPad::DEFAULT_PAD_STICK_RADIUS = 1.0;
-
static const u16 button_bitmasks[] =
{
PAD_BUTTON_A,
diff --git a/Source/Core/Core/HW/GCPadEmu.h b/Source/Core/Core/HW/GCPadEmu.h
index a8ec2e8e91..9ec2aabc08 100644
--- a/Source/Core/Core/HW/GCPadEmu.h
+++ b/Source/Core/Core/HW/GCPadEmu.h
@@ -34,8 +34,6 @@ private:
const unsigned int m_index;
- // TODO: Make constexpr when VS supports it.
- //
// Default analog stick radius for GameCube controllers.
- static const ControlState DEFAULT_PAD_STICK_RADIUS;
+ static constexpr ControlState DEFAULT_PAD_STICK_RADIUS = 1.0;
};
diff --git a/Source/Core/Core/HW/WiimoteEmu/Attachment/Attachment.cpp b/Source/Core/Core/HW/WiimoteEmu/Attachment/Attachment.cpp
index 042ea95176..e270936162 100644
--- a/Source/Core/Core/HW/WiimoteEmu/Attachment/Attachment.cpp
+++ b/Source/Core/Core/HW/WiimoteEmu/Attachment/Attachment.cpp
@@ -9,9 +9,6 @@
namespace WiimoteEmu
{
-// TODO: Move to header when VS supports constexpr.
-const ControlState Attachment::DEFAULT_ATTACHMENT_STICK_RADIUS = 1.0f;
-
// Extension device IDs to be written to the last bytes of the extension reg
// The id for nothing inserted
static const u8 nothing_id[] = { 0x00, 0x00, 0x00, 0x00, 0x2e, 0x2e };
diff --git a/Source/Core/Core/HW/WiimoteEmu/Attachment/Attachment.h b/Source/Core/Core/HW/WiimoteEmu/Attachment/Attachment.h
index 9493430324..22c0d238cb 100644
--- a/Source/Core/Core/HW/WiimoteEmu/Attachment/Attachment.h
+++ b/Source/Core/Core/HW/WiimoteEmu/Attachment/Attachment.h
@@ -28,10 +28,9 @@ public:
u8 calibration[0x10];
protected:
- // TODO: Make constexpr when VS supports it.
- //
+
// Default radius for attachment analog sticks.
- static const ControlState DEFAULT_ATTACHMENT_STICK_RADIUS;
+ static constexpr ControlState DEFAULT_ATTACHMENT_STICK_RADIUS = 1.0;
};
class None : public Attachment