Changeset - r23465:7957ce884d42
[Not reviewed]
master
0 1 0
Johannes E. Krause - 6 years ago 2019-03-12 14:05:00
j.k@eclipso.de
Cleanup: Remove questionable syntax in GetOrderCmdFromTile
1 file changed with 7 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/order_gui.cpp
Show inline comments
 
@@ -395,11 +395,13 @@ static Order GetOrderCmdFromTile(const V
 

	
 
		if (st->owner == _local_company || st->owner == OWNER_NONE) {
 
			byte facil;
 
			(facil = FACIL_DOCK, v->type == VEH_SHIP) ||
 
			(facil = FACIL_TRAIN, v->type == VEH_TRAIN) ||
 
			(facil = FACIL_AIRPORT, v->type == VEH_AIRCRAFT) ||
 
			(facil = FACIL_BUS_STOP, v->type == VEH_ROAD && RoadVehicle::From(v)->IsBus()) ||
 
			(facil = FACIL_TRUCK_STOP, 1);
 
			switch (v->type) {
 
				case VEH_SHIP:     facil = FACIL_DOCK;    break;
 
				case VEH_TRAIN:    facil = FACIL_TRAIN;   break;
 
				case VEH_AIRCRAFT: facil = FACIL_AIRPORT; break;
 
				case VEH_ROAD:     facil = RoadVehicle::From(v)->IsBus() ? FACIL_BUS_STOP : FACIL_TRUCK_STOP; break;
 
				default: NOT_REACHED();
 
			}
 
			if (st->facilities & facil) {
 
				order.MakeGoToStation(st_index);
 
				if (_ctrl_pressed) order.SetLoadType(OLF_FULL_LOAD_ANY);
0 comments (0 inline, 0 general)