Code cleanup: use const short for ndof axis args

This commit is contained in:
Campbell Barton
2014-02-15 18:35:48 +11:00
parent 004decc1d9
commit 6e54c87769
5 changed files with 13 additions and 13 deletions

View File

@@ -854,14 +854,14 @@ bool GHOST_SystemWin32::processNDOF(RAWINPUT const& raw)
{
case 1: // translation
{
short *axis = (short *)(data + 1);
const short *axis = (short *)(data + 1);
// massage into blender view coords (same goes for rotation)
short t[3] = {axis[0], -axis[2], axis[1]};
const short t[3] = {axis[0], -axis[2], axis[1]};
m_ndofManager->updateTranslation(t, now);
if (raw.data.hid.dwSizeHid == 13)
{ // this report also includes rotation
short r[3] = {-axis[3], axis[5], -axis[4]};
const short r[3] = {-axis[3], axis[5], -axis[4]};
m_ndofManager->updateRotation(r, now);
// I've never gotten one of these, has anyone else?
@@ -871,8 +871,8 @@ bool GHOST_SystemWin32::processNDOF(RAWINPUT const& raw)
}
case 2: // rotation
{
short *axis = (short *)(data + 1);
short r[3] = {-axis[0], axis[2], -axis[1]};
const short *axis = (short *)(data + 1);
const short r[3] = {-axis[0], axis[2], -axis[1]};
m_ndofManager->updateRotation(r, now);
break;
}