Commit f98a022a authored by John Biddiscombe's avatar John Biddiscombe

Another attempt to hide warnings about keycodes unused

on UNIX boxes
parent 6f85ae9b
......@@ -181,12 +181,6 @@ void vtkInteractorStyleFlight::OnKeyDown(int ctrl, int shift,
{
this->CtrlKey = ctrl;
this->ShiftKey = shift;
// the following if statement is a dummy one to prevent keycode not used
// warnings under unix, (until the correct keycodes are supplied)
if (keycode==0xFF)
{
vtkWarningMacro(<<"Dummy test to prevent compiler warning");
}
// New Flight mode behaviour
// Note that we'll need #defines for ARROW key defs under non win32 OS
#ifdef _WIN32
......@@ -203,6 +197,13 @@ void vtkInteractorStyleFlight::OnKeyDown(int ctrl, int shift,
}
// it may already be started but it doesn't matter
if (KeysDown) this->DoTimerStart();
#else
// the following if statement is a dummy one to prevent keycode not used
// warnings under unix, (until the correct keycodes are supplied)
if (keycode==0x7F)
{
vtkWarningMacro(<<"Dummy test to prevent compiler warning");
}
#endif
}
......@@ -212,14 +213,8 @@ void vtkInteractorStyleFlight::OnKeyUp(int ctrl, int shift,
{
this->CtrlKey = ctrl;
this->ShiftKey = shift;
// the following if statement is a dummy one to prevent keycode not used
// warnings under unix, (until the correct keycodes are supplied)
if (keycode==0xFF)
{
vtkWarningMacro(<<"Dummy test to prevent compiler warning");
}
#ifdef _WIN32
switch (keycode)
switch (keycode)
{
case VK_LEFT : this->KeysDown &= ~1; break;
case VK_RIGHT : this->KeysDown &= ~2; break;
......@@ -230,6 +225,13 @@ void vtkInteractorStyleFlight::OnKeyUp(int ctrl, int shift,
case 'z':
case 'Z' : this->KeysDown &= ~32; break;
}
#else
// the following if statement is a dummy one to prevent keycode not used
// warnings under unix, (until the correct keycodes are supplied)
if (keycode==0x7F)
{
vtkWarningMacro(<<"Dummy test to prevent compiler warning");
}
#endif
}
//---------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment