3
0
Fork 0
forked from suyu/suyu

input_common/sdl/sdl_impl: Silence sign conversion warnings

Makes the conversions explicit, as opposed to implicit.
This commit is contained in:
Lioncash 2019-05-29 01:33:00 -04:00 committed by Rodrigo Locatti
parent 1edf018319
commit e70f16fff7

View file

@ -143,9 +143,9 @@ std::shared_ptr<SDLJoystick> SDLState::GetSDLJoystickByGUID(const std::string& g
std::lock_guard lock{joystick_map_mutex}; std::lock_guard lock{joystick_map_mutex};
const auto it = joystick_map.find(guid); const auto it = joystick_map.find(guid);
if (it != joystick_map.end()) { if (it != joystick_map.end()) {
while (it->second.size() <= port) { while (it->second.size() <= static_cast<std::size_t>(port)) {
auto joystick = std::make_shared<SDLJoystick>(guid, it->second.size(), nullptr, auto joystick = std::make_shared<SDLJoystick>(guid, static_cast<int>(it->second.size()),
[](SDL_Joystick*) {}); nullptr, [](SDL_Joystick*) {});
it->second.emplace_back(std::move(joystick)); it->second.emplace_back(std::move(joystick));
} }
return it->second[port]; return it->second[port];