Replace std::string::npos with umax

This commit is contained in:
Nekotekina 2020-03-05 14:05:23 +03:00
parent 0a41999818
commit 7a8772dafa
18 changed files with 42 additions and 42 deletions

View file

@ -327,9 +327,9 @@ void evdev_joystick_handler::get_next_button_press(const std::string& padId, con
std::string name = button.second;
// Handle annoying useless buttons
if (padId.find("Xbox 360") != std::string::npos && code >= BTN_TRIGGER_HAPPY)
if (padId.find("Xbox 360") != umax && code >= BTN_TRIGGER_HAPPY)
continue;
if (padId.find("Sony") != std::string::npos && (code == BTN_TL2 || code == BTN_TR2))
if (padId.find("Sony") != umax && (code == BTN_TL2 || code == BTN_TR2))
continue;
if (!get_blacklist && std::find(blacklist.begin(), blacklist.end(), name) != blacklist.end())