16
0
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:
jerrrrycho
2026-06-30 21:19:46 +02:00
parent 7c88907f6b
commit d85096f64d
108 changed files with 4098 additions and 4662 deletions

View File

@@ -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,