Editor code: tidy up BOOLs,NULLs and overrides pt4.
A few 'typedefs' replaced by 'using's This shouldn't have any functional changes at all, just c++17 modernization It's a part 4 of a split #2847 Signed-off-by: Nemerle <nemerle5+git@gmail.com>
This commit is contained in:
@@ -34,12 +34,12 @@ bool C3DConnexionDriver::InitDevice()
|
||||
// Find the Raw Devices
|
||||
UINT nDevices;
|
||||
// Get Number of devices attached
|
||||
if (GetRawInputDeviceList(NULL, &nDevices, sizeof(RAWINPUTDEVICELIST)) != 0)
|
||||
if (GetRawInputDeviceList(nullptr, &nDevices, sizeof(RAWINPUTDEVICELIST)) != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Create list large enough to hold all RAWINPUTDEVICE structs
|
||||
if ((m_pRawInputDeviceList = (PRAWINPUTDEVICELIST)malloc(sizeof(RAWINPUTDEVICELIST) * nDevices)) == NULL)
|
||||
if ((m_pRawInputDeviceList = (PRAWINPUTDEVICELIST)malloc(sizeof(RAWINPUTDEVICELIST) * nDevices)) == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ bool C3DConnexionDriver::InitDevice()
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].usUsagePage = phidInfo->usUsagePage;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].usUsage = phidInfo->usUsage;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].dwFlags = 0;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].hwndTarget = NULL;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].hwndTarget = nullptr;
|
||||
m_nUsagePage1Usage8Devices++;
|
||||
}
|
||||
}
|
||||
@@ -126,8 +126,8 @@ bool C3DConnexionDriver::GetInputMessageData(LPARAM lParam, S3DConnexionMessage&
|
||||
{
|
||||
if (event->header.dwType == RIM_TYPEHID)
|
||||
{
|
||||
static BOOL bGotTranslation = FALSE,
|
||||
bGotRotation = FALSE;
|
||||
static bool bGotTranslation = false,
|
||||
bGotRotation = false;
|
||||
static int all6DOFs[6] = {0};
|
||||
LPRAWHID pRawHid = &event->data.hid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user