(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:
celestar
2007-01-11 11:05:01 +00:00
parent 7996c9e560
commit 2ac0410767
19 changed files with 40 additions and 39 deletions

View File

@@ -234,13 +234,13 @@ static void GetAcceptedCargo_Unmovable(TileIndex tile, AcceptedCargo ac)
// Top town building generates 10, so to make HQ interesting, the top
// type makes 20.
ac[CT_PASSENGERS] = max(1, level);
ac[CT_PASSENGERS] = max(1U, level);
// Top town building generates 4, HQ can make up to 8. The
// proportion passengers:mail is different because such a huge
// commercial building generates unusually high amount of mail
// correspondence per physical visitor.
ac[CT_MAIL] = max(1, level / 2);
ac[CT_MAIL] = max(1U, level / 2);
}