diff --git a/src/common/math_util.h b/src/common/math_util.h index cff3d48c5c..d6c35ee899 100644 --- a/src/common/math_util.h +++ b/src/common/math_util.h @@ -41,4 +41,7 @@ struct Rectangle { } }; +template +Rectangle(T, T, T, T)->Rectangle; + } // namespace Common diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp index 5949ecbaef..0b69bfede5 100644 --- a/src/input_common/sdl/sdl_impl.cpp +++ b/src/input_common/sdl/sdl_impl.cpp @@ -143,9 +143,9 @@ std::shared_ptr SDLState::GetSDLJoystickByGUID(const std::string& g std::lock_guard lock{joystick_map_mutex}; const auto it = joystick_map.find(guid); if (it != joystick_map.end()) { - while (it->second.size() <= port) { - auto joystick = std::make_shared(guid, it->second.size(), nullptr, - [](SDL_Joystick*) {}); + while (it->second.size() <= static_cast(port)) { + auto joystick = std::make_shared(guid, static_cast(it->second.size()), + nullptr, [](SDL_Joystick*) {}); it->second.emplace_back(std::move(joystick)); } return it->second[port];