Core: Use constexpr for default pad and attachment radius

This commit is contained in:
Lioncash 2015-09-03 19:44:42 -04:00
parent f83f3cf594
commit 4fd060ba11
4 changed files with 3 additions and 12 deletions

View File

@ -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,

View File

@ -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;
};

View File

@ -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 };

View File

@ -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