diff options
author | rubenwardy <rubenwardy@gmail.com> | 2017-04-07 19:06:50 +0100 |
---|---|---|
committer | rubenwardy <rubenwardy@gmail.com> | 2017-04-07 19:06:50 +0100 |
commit | 271d7c31e69db0bb6c5cf2cfb6e97ba129045d3e (patch) | |
tree | 2fae4ae9a4dbcd30461377e4554488d0167ee6d3 /src | |
parent | c28a843592f8c88c6bb1cca830009d1affb3e9e0 (diff) | |
download | minetest-271d7c31e69db0bb6c5cf2cfb6e97ba129045d3e.tar.gz minetest-271d7c31e69db0bb6c5cf2cfb6e97ba129045d3e.tar.bz2 minetest-271d7c31e69db0bb6c5cf2cfb6e97ba129045d3e.zip |
Fix signed/unsigned conversion warning
There was no bug here (as I checked for negativeness),
however it's good to get rid of warnings.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/joystick_controller.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/joystick_controller.cpp b/src/client/joystick_controller.cpp index 311cd22fb..e6a572adb 100644 --- a/src/client/joystick_controller.cpp +++ b/src/client/joystick_controller.cpp @@ -170,12 +170,12 @@ void JoystickController::onJoystickConnect(const std::vector<irr::SJoystickInfo> s32 id = g_settings->getS32("joystick_id"); std::string layout = g_settings->get("joystick_type"); - if (id < 0 || id >= joystick_infos.size()) { + if (id < 0 || (u16)id >= joystick_infos.size()) { // TODO: auto detection id = 0; } - if (id >= 0 && id < joystick_infos.size()) { + if (id >= 0 && (u16)id < joystick_infos.size()) { if (layout.empty() || layout == "auto") setLayoutFromControllerName(joystick_infos[id].Name.c_str()); else |