summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2020-05-17 23:31:59 +0200
committerMichael Lutz <michi@icosahedron.de>2020-05-21 20:02:34 +0200
commit63ccb36ef3ecd53a503c0e9fea87f0784802af0f (patch)
treed3e1134029fd437d1ad2d948f83592b930e9456f /src/vehicle_gui.cpp
parent9b6f5e3bb850b6cff02cc761767fcdf49c681645 (diff)
downloadopenttd-63ccb36ef3ecd53a503c0e9fea87f0784802af0f.tar.xz
Codechange: Use std::string for most of the user-settable custom names.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index bd38ea26a..79ffffcf0 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -1395,7 +1395,7 @@ void BaseVehicleListWindow::DrawVehicleListItems(VehicleID selected_vehicle, int
DrawVehicleImage(v, image_left, image_right, y + FONT_HEIGHT_SMALL - 1, selected_vehicle, EIT_IN_LIST, 0);
DrawString(text_left, text_right, y + line_height - FONT_HEIGHT_SMALL - WD_FRAMERECT_BOTTOM - 1, STR_VEHICLE_LIST_PROFIT_THIS_YEAR_LAST_YEAR);
- if (v->name != nullptr) {
+ if (!v->name.empty()) {
/* The vehicle got a name so we will print it */
SetDParam(0, v->index);
DrawString(text_left, text_right, y, STR_TINY_BLACK_VEHICLE);