summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorrubenwardy <rubenwardy@gmail.com>2017-04-07 19:06:50 +0100
committerrubenwardy <rubenwardy@gmail.com>2017-04-07 19:06:50 +0100
commit271d7c31e69db0bb6c5cf2cfb6e97ba129045d3e (patch)
tree2fae4ae9a4dbcd30461377e4554488d0167ee6d3 /src/client
parentc28a843592f8c88c6bb1cca830009d1affb3e9e0 (diff)
downloadminetest-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/client')
-rw-r--r--src/client/joystick_controller.cpp4
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