forked from mirror/OpenTTD
(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:
@@ -366,7 +366,7 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e)
|
||||
/* Clicked buttons, decrease or increase production */
|
||||
if (x < 15) {
|
||||
if (isProductionMinimum(i, line)) return;
|
||||
i->production_rate[line] = maxu(i->production_rate[line] / 2, 1);
|
||||
i->production_rate[line] = max(i->production_rate[line] / 2, 1);
|
||||
} else {
|
||||
if (isProductionMaximum(i, line)) return;
|
||||
i->production_rate[line] = minu(i->production_rate[line] * 2, 255);
|
||||
|
Reference in New Issue
Block a user