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

@ -146,7 +146,7 @@ int xinput_pad_handler::GetDeviceNumber(const std::string& padId)
return -1;
size_t pos = padId.find(m_name_string);
if (pos == std::string::npos)
if (pos == umax)
return -1;
int device_number = std::stoul(padId.substr(pos + 12)) - 1; // Controllers 1-n in GUI