X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fcontrol%2Fjoystickkeyboardcontroller.cpp;h=d314dae778299e97e954078b5a8e94a95e7524c6;hb=0b585f0dc8e185bcf1a7e281108281f5b2b96706;hp=83cbdbced4edbddf8019054aef9bf74211b1e241;hpb=7ad6b7ed9d8d7c76ec7b70e4c27f47bd424b176e;p=supertux.git diff --git a/src/control/joystickkeyboardcontroller.cpp b/src/control/joystickkeyboardcontroller.cpp index 83cbdbced..d314dae77 100644 --- a/src/control/joystickkeyboardcontroller.cpp +++ b/src/control/joystickkeyboardcontroller.cpp @@ -55,7 +55,7 @@ public: JoystickKeyboardController::JoystickKeyboardController() : wait_for_key(-1), wait_for_joybutton(-1) { - memset(last_keys, 0, sizeof(last_keys)); + memset(last_keys, 0, sizeof(last_keys)); // initialize default keyboard map keymap.insert(std::make_pair(SDLK_LEFT, LEFT)); @@ -520,7 +520,7 @@ JoystickKeyboardController::check_cheatcode(const std::string& cheatcode) return false; } - for(int i = 0; i < cheatcode.size(); ++i) { + for(size_t i = 0; i < cheatcode.size(); ++i) { if(last_keys[sizeof(last_keys)-1 - i] != cheatcode[cheatcode.size()-1-i]) return false; }