Fix signed-unsigned comparisons and mark warning as error (part 2).

This commit is contained in:
Nekotekina 2020-02-19 20:03:59 +03:00
parent 771eff273b
commit 92e3eaf3ff
68 changed files with 194 additions and 202 deletions

View file

@ -738,7 +738,7 @@ void evdev_joystick_handler::get_mapping(const std::shared_ptr<PadDevice>& devic
// Translate any corresponding keycodes to our normal DS3 buttons and triggers
for (int i = 0; i < static_cast<int>(pad->m_buttons.size()); i++)
{
if (pad->m_buttons[i].m_keyCode != button_code)
if (pad->m_buttons[i].m_keyCode != button_code + 0u)
continue;
// Be careful to handle mapped axis specially
@ -773,7 +773,7 @@ void evdev_joystick_handler::get_mapping(const std::shared_ptr<PadDevice>& devic
bool pressed_max = false;
// m_keyCodeMin is the mapped key for left or down
if (pad->m_sticks[idx].m_keyCodeMin == button_code)
if (pad->m_sticks[idx].m_keyCodeMin == button_code + 0u)
{
bool is_direction_min = false;
@ -799,7 +799,7 @@ void evdev_joystick_handler::get_mapping(const std::shared_ptr<PadDevice>& devic
}
// m_keyCodeMax is the mapped key for right or up
if (pad->m_sticks[idx].m_keyCodeMax == button_code)
if (pad->m_sticks[idx].m_keyCodeMax == button_code + 0u)
{
bool is_direction_max = false;