summaryrefslogtreecommitdiff
path: root/src/roadveh_gui.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2011-01-29 17:30:25 +0000
committerterkhen <terkhen@openttd.org>2011-01-29 17:30:25 +0000
commit734994c9ba642f5c75b709d4b44e0c4b993a949a (patch)
treef7f6264f438d4707aaa7e4bfe4c2a223a0c4abba /src/roadveh_gui.cpp
parent50b0e1002621720c6b2cd4b8e20856b86da0b61d (diff)
downloadopenttd-734994c9ba642f5c75b709d4b44e0c4b993a949a.tar.xz
(svn r21924) -Codechange: Unify some parts of the articulated vehicle code.
-Cleanup: Avoid conversions to Train and RoadVehicle that are no longer required.
Diffstat (limited to 'src/roadveh_gui.cpp')
-rw-r--r--src/roadveh_gui.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp
index 029234c26..0cbaee06c 100644
--- a/src/roadveh_gui.cpp
+++ b/src/roadveh_gui.cpp
@@ -31,9 +31,7 @@
*/
void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y)
{
- const RoadVehicle *rv = RoadVehicle::From(v);
-
- uint y_offset = rv->HasArticulatedPart() ? 15 : 0; // Draw the first line below the sprite of an articulated RV instead of after it.
+ uint y_offset = v->HasArticulatedPart() ? 15 : 0; // Draw the first line below the sprite of an articulated RV instead of after it.
StringID str;
Money feeder_share = 0;
@@ -42,7 +40,7 @@ void DrawRoadVehDetails(const Vehicle *v, int left, int right, int y)
SetDParam(2, v->value);
DrawString(left, right, y + y_offset, STR_VEHICLE_INFO_BUILT_VALUE, TC_FROMSTRING, SA_LEFT | SA_STRIP);
- if (rv->HasArticulatedPart()) {
+ if (v->HasArticulatedPart()) {
CargoArray max_cargo;
StringID subtype_text[NUM_CARGO];
char capacity[512];