(svn r8055) -Codechange: Replace the different max, dmax, maxu whatever macros by a simple template function max(), that requires two arguments of the same type. While I'm at it change a variable called "max" to "maxval" in a function that calls max().
This commit is contained in:
@@ -437,7 +437,7 @@ static void GameDifficultyWndProc(Window *w, WindowEvent *e)
|
||||
const GameSettingData *info;
|
||||
int x, y;
|
||||
uint btn, dis;
|
||||
int val;
|
||||
int16 val;
|
||||
|
||||
// Don't allow clients to make any changes
|
||||
if (_networking && !_network_server)
|
||||
@@ -473,7 +473,8 @@ static void GameDifficultyWndProc(Window *w, WindowEvent *e)
|
||||
SETBIT(_difficulty_click_b, btn);
|
||||
} else {
|
||||
// Decrease button clicked
|
||||
val = max(val - info->step, info->min);
|
||||
val -= info->step;
|
||||
val = max(val, info->min);
|
||||
SETBIT(_difficulty_click_a, btn);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user