From cff2fc7eba46264fb40531e89f28f8590fa6be48 Mon Sep 17 00:00:00 2001 From: Vasily Date: Tue, 19 Feb 2019 18:51:29 +0100 Subject: [PATCH] Fix more -Wfloat-conversion warnings --- src/tabcontrollers/ChaperoneTabController.cpp | 7 ++++--- src/tabcontrollers/StatisticsTabController.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tabcontrollers/ChaperoneTabController.cpp b/src/tabcontrollers/ChaperoneTabController.cpp index 0fd5de3..eb4c372 100644 --- a/src/tabcontrollers/ChaperoneTabController.cpp +++ b/src/tabcontrollers/ChaperoneTabController.cpp @@ -733,9 +733,10 @@ void ChaperoneTabController::setBoundsVisibility( float value, bool notify ) if ( m_visibility != value ) { m_visibility = value; - vr::VRSettings()->SetInt32( vr::k_pch_CollisionBounds_Section, - vr::k_pch_CollisionBounds_ColorGammaA_Int32, - 255 * m_visibility ); + vr::VRSettings()->SetInt32( + vr::k_pch_CollisionBounds_Section, + vr::k_pch_CollisionBounds_ColorGammaA_Int32, + static_cast( 255 * m_visibility ) ); vr::VRSettings()->Sync(); if ( notify ) { diff --git a/src/tabcontrollers/StatisticsTabController.cpp b/src/tabcontrollers/StatisticsTabController.cpp index 89e7713..66ed5fe 100644 --- a/src/tabcontrollers/StatisticsTabController.cpp +++ b/src/tabcontrollers/StatisticsTabController.cpp @@ -93,7 +93,7 @@ void StatisticsTabController::eventLoopTick( float StatisticsTabController::hmdDistanceMoved() const { - return m_hmdDistanceMoved; + return static_cast( m_hmdDistanceMoved ); } float StatisticsTabController::hmdRotations() const