diff options
-rw-r--r-- | src/gui/outfitwindow.cpp | 6 | ||||
-rw-r--r-- | src/gui/outfitwindow.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp index 20b2bac27..73484f1d5 100644 --- a/src/gui/outfitwindow.cpp +++ b/src/gui/outfitwindow.cpp @@ -504,7 +504,7 @@ static const SDLKey numsTbl[] = int OutfitWindow::keyToNumber(SDLKey key) const { - for (int f = 0; f < sizeof(numsTbl) / sizeof(SDLKey); f ++) + for (unsigned f = 0; f < sizeof(numsTbl) / sizeof(SDLKey); f ++) { if (numsTbl[f] == key) return f; @@ -512,9 +512,9 @@ int OutfitWindow::keyToNumber(SDLKey key) const return -1; } -SDLKey OutfitWindow::numberToKey(int number) const +SDLKey OutfitWindow::numberToKey(unsigned number) const { - if (number < 0 || number >= sizeof(numsTbl) / sizeof(SDLKey)) + if (number >= sizeof(numsTbl) / sizeof(SDLKey)) return SDLK_UNKNOWN; return numsTbl[number]; } diff --git a/src/gui/outfitwindow.h b/src/gui/outfitwindow.h index b2b46c7e7..a663f3657 100644 --- a/src/gui/outfitwindow.h +++ b/src/gui/outfitwindow.h @@ -90,7 +90,7 @@ class OutfitWindow : public Window, gcn::ActionListener int keyToNumber(SDLKey key) const A_PURE; - SDLKey numberToKey(int number) const A_PURE; + SDLKey numberToKey(unsigned number) const A_PURE; void next(); |