1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2025-04-21 12:27:27 +03:00

utilities: Replace min/max functions by the versions from STL.

This commit is contained in:
Maarten ter Huurne
2011-10-23 17:00:23 +02:00
parent 40c510a28a
commit aea1c44020
7 changed files with 21 additions and 21 deletions

View File

@@ -1541,7 +1541,8 @@ void GMenu2X::contextMenu() {
}
bool close = false;
uint i, sel=0, fadeAlpha=0;
uint i, fadeAlpha=0;
int sel = 0;
int h = font->getHeight();
SDL_Rect box;
@@ -1624,10 +1625,10 @@ void GMenu2X::contextMenu() {
close = true;
break;
case InputManager::UP:
sel = max(0, sel-1);
sel = std::max(0, sel-1);
break;
case InputManager::DOWN:
sel = min((int)voices.size()-1, sel+1);
sel = std::min((int)voices.size()-1, sel+1);
break;
case InputManager::ACCEPT:
voices[sel].action();