From 1400abb6cfd9596e2b9430385d68e6527f6b0d2b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 29 Jan 2012 04:22:28 +0300 Subject: Fix compilation warnings. --- src/gui/outfitwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/outfitwindow.cpp') 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]; } -- cgit v1.2.3-70-g09d2