Add brackets to optimize statement
Not having brackets forces the compiler to see the statement as (xdelta * 360.0) * 8.0, which requires two `mulsd` operations. Adding the brackets only requires one. More details here https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/pull/87
This commit is contained in:
@@ -644,10 +644,10 @@ void OverlayController::mainEventLoop()
|
||||
m_ptLastMouse,
|
||||
m_pWindow->mapToGlobal( m_ptLastMouse ),
|
||||
QPoint(),
|
||||
QPoint( static_cast<int>( vrEvent.data.scroll.xdelta * 360.0f
|
||||
* 8.0f ),
|
||||
static_cast<int>( vrEvent.data.scroll.ydelta * 360.0f
|
||||
* 8.0f ) ),
|
||||
QPoint( static_cast<int>( vrEvent.data.scroll.xdelta
|
||||
* ( 360.0f * 8.0f ) ),
|
||||
static_cast<int>( vrEvent.data.scroll.ydelta
|
||||
* ( 360.0f * 8.0f ) ) ),
|
||||
0,
|
||||
Qt::Vertical,
|
||||
m_lastMouseButtons,
|
||||
|
||||
Reference in New Issue
Block a user