(svn r16717) -Codechange: make IsFrontEngine() member of Train

This commit is contained in:
smatz
2009-07-01 22:22:01 +00:00
parent 15990079ce
commit adc5363202
17 changed files with 114 additions and 106 deletions

View File

@@ -2023,7 +2023,7 @@ int WhoCanServiceIndustry(Industry *ind)
/* Check whether it accepts the right kind of cargo */
bool c_accepts = false;
bool c_produces = false;
if (v->type == VEH_TRAIN && IsFrontEngine(v)) {
if (v->type == VEH_TRAIN && Train::From(v)->IsFrontEngine()) {
for (const Vehicle *u = v; u != NULL; u = u->Next()) {
CanCargoServiceIndustry(u->cargo_type, ind, &c_accepts, &c_produces);
}