diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-01-29 04:22:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-01-29 04:22:28 +0300 |
commit | 1400abb6cfd9596e2b9430385d68e6527f6b0d2b (patch) | |
tree | 05e9ddbeb8faaebd130b0f01cc347c2886d8bfe5 | |
parent | 45d131ef829670b7b87783734375a8ea4880e595 (diff) | |
download | manaverse-1400abb6cfd9596e2b9430385d68e6527f6b0d2b.tar.gz manaverse-1400abb6cfd9596e2b9430385d68e6527f6b0d2b.tar.bz2 manaverse-1400abb6cfd9596e2b9430385d68e6527f6b0d2b.tar.xz manaverse-1400abb6cfd9596e2b9430385d68e6527f6b0d2b.zip |
Fix compilation warnings.
-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(); |