From 400654898b1039c4c85594677564ed6de9151415 Mon Sep 17 00:00:00 2001 From: Vasily Date: Mon, 18 Feb 2019 18:43:40 +0100 Subject: [PATCH] Fix gcc -Wdouble-promotion issues --- src/tabcontrollers/MoveCenterTabController.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tabcontrollers/MoveCenterTabController.cpp b/src/tabcontrollers/MoveCenterTabController.cpp index c9e8acf..9b0dd2d 100644 --- a/src/tabcontrollers/MoveCenterTabController.cpp +++ b/src/tabcontrollers/MoveCenterTabController.cpp @@ -230,8 +230,8 @@ void MoveCenterTabController::setRotation( int value, bool notify ) vr::EChaperoneConfigFile_Live ); // Update UI offsets. - m_offsetX += hmdRotDiff[0]; - m_offsetZ += hmdRotDiff[2]; + m_offsetX += static_cast( hmdRotDiff[0] ); + m_offsetZ += static_cast( hmdRotDiff[2] ); if ( notify ) { emit offsetXChanged( m_offsetX ); @@ -996,15 +996,15 @@ void MoveCenterTabController::eventLoopTick( // prevents UI from updating if axis movement is locked if ( !m_lockXToggle ) { - m_offsetX += diff[0]; + m_offsetX += static_cast( diff[0] ); } if ( !m_lockYToggle ) { - m_offsetY += diff[1]; + m_offsetY += static_cast( diff[1] ); } if ( !m_lockZToggle ) { - m_offsetZ += diff[2]; + m_offsetZ += static_cast( diff[2] ); } rotateCoordinates( diff, angle );