summaryrefslogtreecommitdiff
path: root/src/misc_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-18 21:44:47 +0000
committerrubidium <rubidium@openttd.org>2007-06-18 21:44:47 +0000
commit2ee73b50b8dae28f53acabcb5b7c0e3f02139db2 (patch)
tree56cef93f015d710536a1801fe14c3095d290a172 /src/misc_cmd.cpp
parent7a72dcb3b57b70214c4d402be89f9b1dd158d790 (diff)
downloadopenttd-2ee73b50b8dae28f53acabcb5b7c0e3f02139db2.tar.xz
(svn r10208) -Codechange: replace int32 with Money where appropriate.
Diffstat (limited to 'src/misc_cmd.cpp')
-rw-r--r--src/misc_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp
index d96689f67..ecbf5d8bf 100644
--- a/src/misc_cmd.cpp
+++ b/src/misc_cmd.cpp
@@ -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);