summaryrefslogtreecommitdiff
path: root/src/autoreplace_gui.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/autoreplace_gui.cpp
parent814f153b5a98e0030cbd221e6a89e083ce62bb1d (diff)
downloadopenttd-6221d74644922ea4bbba3ed9cd8bbec42398f77b.tar.xz
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r--src/autoreplace_gui.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index 92f48960d..2e8438ecf 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -69,14 +69,14 @@ static int CDECL EngineNumberSorter(const void *a, const void *b)
*/
void InvalidateAutoreplaceWindow(EngineID e, GroupID id_g)
{
- Company *c = GetCompany(_local_company);
+ Company *c = Company::Get(_local_company);
uint num_engines = GetGroupNumEngines(_local_company, id_g, e);
if (num_engines == 0 || c->num_engines[e] == 0) {
/* We don't have any of this engine type.
* Either we just sold the last one, we build a new one or we stopped replacing it.
* In all cases, we need to update the left list */
- InvalidateWindowData(WC_REPLACE_VEHICLE, GetEngine(e)->type, true);
+ InvalidateWindowData(WC_REPLACE_VEHICLE, Engine::Get(e)->type, true);
}
}
@@ -148,7 +148,7 @@ class ReplaceVehicleWindow : public Window {
const uint num_engines = GetGroupNumEngines(_local_company, selected_group, eid);
/* Skip drawing the engines we don't have any of and haven't set for replacement */
- if (num_engines == 0 && EngineReplacementForCompany(GetCompany(_local_company), eid, selected_group) == INVALID_ENGINE) continue;
+ if (num_engines == 0 && EngineReplacementForCompany(Company::Get(_local_company), eid, selected_group) == INVALID_ENGINE) continue;
} else {
if (!CheckAutoreplaceValidity(this->sel_engine[0], eid, _local_company)) continue;
}
@@ -238,7 +238,7 @@ public:
{
if (this->update_left || this->update_right) this->GenerateLists();
- Company *c = GetCompany(_local_company);
+ Company *c = Company::Get(_local_company);
EngineID selected_id[2];
const GroupID selected_group = this->sel_group;
@@ -334,7 +334,7 @@ public:
break;
case RVW_WIDGET_TRAIN_RAILTYPE_DROPDOWN: { // Railtype selection dropdown menu
- const Company *c = GetCompany(_local_company);
+ const Company *c = Company::Get(_local_company);
DropDownList *list = new DropDownList();
for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) {
const RailtypeInfo *rti = GetRailTypeInfo(rt);
@@ -347,7 +347,7 @@ public:
}
case RVW_WIDGET_TRAIN_WAGONREMOVE_TOGGLE: // toggle renew_keep_length
- DoCommandP(0, 5, GetCompany(_local_company)->settings.renew_keep_length ? 0 : 1, CMD_SET_AUTOREPLACE);
+ DoCommandP(0, 5, Company::Get(_local_company)->settings.renew_keep_length ? 0 : 1, CMD_SET_AUTOREPLACE);
break;
case RVW_WIDGET_START_REPLACE: { // Start replacing