summaryrefslogtreecommitdiff
path: root/src/misc_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-16 23:34:14 +0000
committersmatz <smatz@openttd.org>2009-05-16 23:34:14 +0000
commit6221d74644922ea4bbba3ed9cd8bbec42398f77b (patch)
tree0069bbd6bb7525754c5d9353132f5dc64a0996cc /src/misc_cmd.cpp
parent814f153b5a98e0030cbd221e6a89e083ce62bb1d (diff)
downloadopenttd-6221d74644922ea4bbba3ed9cd8bbec42398f77b.tar.xz
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
Diffstat (limited to 'src/misc_cmd.cpp')
-rw-r--r--src/misc_cmd.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp
index 4df2ec41f..907d6724c 100644
--- a/src/misc_cmd.cpp
+++ b/src/misc_cmd.cpp
@@ -35,7 +35,7 @@ CommandCost CmdSetCompanyManagerFace(TileIndex tile, DoCommandFlag flags, uint32
if (!IsValidCompanyManagerFace(cmf)) return CMD_ERROR;
if (flags & DC_EXEC) {
- GetCompany(_current_company)->face = cmf;
+ Company::Get(_current_company)->face = cmf;
MarkWholeScreenDirty();
}
return CommandCost();
@@ -60,7 +60,7 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1,
if (scheme >= LS_END || state >= 3) return CMD_ERROR;
- Company *c = GetCompany(_current_company);
+ Company *c = Company::Get(_current_company);
/* Ensure no two companies have the same primary colour */
if (scheme == LS_DEFAULT && state == 0) {
@@ -138,7 +138,7 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1,
*/
CommandCost CmdIncreaseLoan(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
{
- Company *c = GetCompany(_current_company);
+ Company *c = Company::Get(_current_company);
if (c->current_loan >= _economy.max_loan) {
SetDParam(0, _economy.max_loan);
@@ -182,7 +182,7 @@ CommandCost CmdIncreaseLoan(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
*/
CommandCost CmdDecreaseLoan(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
{
- Company *c = GetCompany(_current_company);
+ Company *c = Company::Get(_current_company);
if (c->current_loan == 0) return_cmd_error(STR_ERROR_LOAN_ALREADY_REPAYED);
@@ -242,7 +242,7 @@ CommandCost CmdRenameCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
}
if (flags & DC_EXEC) {
- Company *c = GetCompany(_current_company);
+ Company *c = Company::Get(_current_company);
free(c->name);
c->name = reset ? NULL : strdup(text);
MarkWholeScreenDirty();
@@ -278,7 +278,7 @@ CommandCost CmdRenamePresident(TileIndex tile, DoCommandFlag flags, uint32 p1, u
}
if (flags & DC_EXEC) {
- Company *c = GetCompany(_current_company);
+ Company *c = Company::Get(_current_company);
free(c->president_name);
if (reset) {
@@ -382,7 +382,7 @@ CommandCost CmdGiveMoney(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
{
if (!_settings_game.economy.give_money) return CMD_ERROR;
- const Company *c = GetCompany(_current_company);
+ const Company *c = Company::Get(_current_company);
CommandCost amount(EXPENSES_OTHER, min((Money)p1, (Money)20000000LL));
/* You can only transfer funds that is in excess of your loan */