summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/DInput
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2019-06-18 11:33:08 +0200
committerGitHub <noreply@github.com>2019-06-18 11:33:08 +0200
commitff96dc0e6ffd250b23ccb5ebceb12623da604435 (patch)
tree1a1279d6bff0945ae575c195ec357af239896d8f /Source/Core/InputCommon/ControllerInterface/DInput
parentac562279c3a9fe9cc660b703ed0fd3f8ab2be758 (diff)
parent72b04a353ddfa79ec10fe447bef8eeaefc824976 (diff)
Merge pull request #8199 from lioncash/namespace
General: Use nested namespace specifiers where applicable
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/DInput')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp7
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInput.h7
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp7
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h7
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp7
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h7
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.cpp7
-rw-r--r--Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.h7
8 files changed, 16 insertions, 40 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp
index 847f4f8103..6afa98ac2d 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.cpp
@@ -14,9 +14,7 @@
#pragma comment(lib, "Dinput8.lib")
#pragma comment(lib, "dxguid.lib")
-namespace ciface
-{
-namespace DInput
+namespace ciface::DInput
{
BOOL CALLBACK DIEnumDeviceObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef)
{
@@ -69,5 +67,4 @@ void PopulateDevices(HWND hwnd)
idi8->Release();
}
-} // namespace DInput
-} // namespace ciface
+} // namespace ciface::DInput
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.h
index 419a942cb4..ed159089e0 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInput.h
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInput.h
@@ -12,9 +12,7 @@
#include "InputCommon/ControllerInterface/DInput/DInput8.h"
-namespace ciface
-{
-namespace DInput
+namespace ciface::DInput
{
// BOOL CALLBACK DIEnumEffectsCallback(LPCDIEFFECTINFO pdei, LPVOID pvRef);
BOOL CALLBACK DIEnumDeviceObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef);
@@ -22,5 +20,4 @@ BOOL CALLBACK DIEnumDevicesCallback(LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef);
std::string GetDeviceName(const LPDIRECTINPUTDEVICE8 device);
void PopulateDevices(HWND hwnd);
-} // namespace DInput
-} // namespace ciface
+} // namespace ciface::DInput
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
index e919952bec..bba6b87ae6 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp
@@ -14,9 +14,7 @@
#include "InputCommon/ControllerInterface/DInput/DInputJoystick.h"
#include "InputCommon/ControllerInterface/DInput/XInputFilter.h"
-namespace ciface
-{
-namespace DInput
+namespace ciface::DInput
{
constexpr DWORD DATA_BUFFER_SIZE = 32;
@@ -315,5 +313,4 @@ ControlState Joystick::Hat::GetState() const
return (abs((int)(m_hat / 4500 - m_direction * 2 + 8) % 8 - 4) > 2);
}
-} // namespace DInput
-} // namespace ciface
+} // namespace ciface::DInput
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h
index 074b879051..70e8af8e6e 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h
@@ -7,9 +7,7 @@
#include "InputCommon/ControllerInterface/Device.h"
#include "InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h"
-namespace ciface
-{
-namespace DInput
+namespace ciface::DInput
{
void InitJoystick(IDirectInput8* const idi8, HWND hwnd);
@@ -77,5 +75,4 @@ private:
bool m_buffered;
};
-} // namespace DInput
-} // namespace ciface
+} // namespace ciface::DInput
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
index b68c990490..24edc4386c 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.cpp
@@ -17,9 +17,7 @@
// otherwise it is just some crazy value
#define DROP_INPUT_TIME 250
-namespace ciface
-{
-namespace DInput
+namespace ciface::DInput
{
static const struct
{
@@ -227,5 +225,4 @@ ControlState KeyboardMouse::Cursor::GetState() const
{
return m_axis / (m_positive ? 1.0 : -1.0);
}
-} // namespace DInput
-} // namespace ciface
+} // namespace ciface::DInput
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h
index 7d533314c3..e1d2500b15 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h
@@ -9,9 +9,7 @@
#include "InputCommon/ControllerInterface/DInput/DInput8.h"
#include "InputCommon/ControllerInterface/Device.h"
-namespace ciface
-{
-namespace DInput
+namespace ciface::DInput
{
void InitKeyboardMouse(IDirectInput8* const idi8, HWND hwnd);
@@ -103,5 +101,4 @@ private:
DWORD m_last_update;
State m_state_in;
};
-} // namespace DInput
-} // namespace ciface
+} // namespace ciface::DInput
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.cpp
index 9e704e9420..94040994e7 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.cpp
@@ -9,9 +9,7 @@
#include <Windows.h>
#include <SetupAPI.h>
-namespace ciface
-{
-namespace DInput
+namespace ciface::DInput
{
// Code for enumerating hardware devices that use the XINPUT device driver.
// The MSDN recommended code suffers from massive performance problems when using language packs,
@@ -76,5 +74,4 @@ std::unordered_set<DWORD> GetXInputGUIDS()
SetupDiDestroyDeviceInfoList(setup_enum);
return guids;
}
-} // namespace DInput
-} // namespace ciface
+} // namespace ciface::DInput
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.h b/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.h
index f31e9fb5a2..46955a1eb1 100644
--- a/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.h
+++ b/Source/Core/InputCommon/ControllerInterface/DInput/XInputFilter.h
@@ -7,10 +7,7 @@
#include <Windows.h>
#include <unordered_set>
-namespace ciface
-{
-namespace DInput
+namespace ciface::DInput
{
std::unordered_set<DWORD> GetXInputGUIDS();
-}
-} // namespace ciface
+} // namespace ciface::DInput