(svn r10208) -Codechange: replace int32 with Money where appropriate.

This commit is contained in:
rubidium
2007-06-18 21:44:47 +00:00
parent 7a72dcb3b5
commit 2ee73b50b8
16 changed files with 137 additions and 121 deletions

View File

@@ -133,7 +133,7 @@ CommandCost CmdIncreaseLoan(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
return_cmd_error(STR_702B_MAXIMUM_PERMITTED_LOAN);
}
int32 loan;
Money loan;
switch (p2) {
default: return CMD_ERROR; // Invalid method
case 0: // Take some extra loan
@@ -289,7 +289,7 @@ CommandCost CmdMoneyCheat(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (_networking) return CMD_ERROR;
#endif
SET_EXPENSES_TYPE(EXPENSES_OTHER);
return CommandCost(-(int32)p1);
return CommandCost(-(Money)p1);
}
/** Transfer funds (money) from one player to another.
@@ -304,7 +304,7 @@ CommandCost CmdMoneyCheat(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
CommandCost CmdGiveMoney(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
const Player *p = GetPlayer(_current_player);
CommandCost amount(min((int32)p1, 20000000));
CommandCost amount((Money)min(p1, 20000000LL));
SET_EXPENSES_TYPE(EXPENSES_OTHER);