mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 22:39:18 +02:00
reformat: remove redundant parentheses
This commit is contained in:
@@ -95,9 +95,7 @@ gamepad_input::poll() {
|
||||
// button pressed or released, both are important
|
||||
on_button(
|
||||
idx,
|
||||
( buttons[ idx ] == 1 ?
|
||||
GLFW_PRESS :
|
||||
GLFW_RELEASE ) );
|
||||
buttons[idx] == 1 ? GLFW_PRESS : GLFW_RELEASE);
|
||||
}
|
||||
else {
|
||||
// otherwise we only pass info about button being held down
|
||||
@@ -476,10 +474,7 @@ gamepad_input::process_axes() {
|
||||
param = 0.0;
|
||||
}
|
||||
else {
|
||||
param = (
|
||||
param > 0.0 ?
|
||||
( param - m_deadzone ) / ( 1.0 - m_deadzone ) :
|
||||
( param + m_deadzone ) / ( 1.0 - m_deadzone ) );
|
||||
param = param > 0.0 ? (param - m_deadzone) / (1.0 - m_deadzone) : (param + m_deadzone) / (1.0 - m_deadzone);
|
||||
}
|
||||
if( param != 0.0 ) {
|
||||
if( inputtype == input_type::value_invert ) {
|
||||
@@ -515,8 +510,8 @@ gamepad_input::process_axes() {
|
||||
auto const param1 { std::get<0>( command.second ) };
|
||||
auto const param2 { std::get<1>( command.second ) };
|
||||
auto &lastparams { m_lastcommandparams[ command.first ] };
|
||||
if( ( param1 != 0.0 ) || ( std::get<0>( lastparams ) != 0.0 )
|
||||
|| ( param2 != 0.0 ) || ( std::get<1>( lastparams ) != 0.0 ) ) {
|
||||
if( param1 != 0.0 || std::get<0>(lastparams) != 0.0
|
||||
|| param2 != 0.0 || std::get<1>(lastparams) != 0.0 ) {
|
||||
m_relay.post(
|
||||
command.first,
|
||||
param1,
|
||||
|
||||
Reference in New Issue
Block a user