summaryrefslogtreecommitdiff
path: root/src/industry_gui.cpp
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-06 16:32:57 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-06 21:45:36 +0200
commitcb89d22cf248841f93d257983770a08aa0a64561 (patch)
treea72987809f3bbf582b4431ba7d57349e03553172 /src/industry_gui.cpp
parent6bca9e090dc6637fd7b6ed6a5a37d65f151849e9 (diff)
downloadopenttd-cb89d22cf248841f93d257983770a08aa0a64561.tar.xz
Codechange: add DrawString(Multiline) that accepts std::string&
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r--src/industry_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp
index d0c916ef7..147d4dc77 100644
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -572,12 +572,12 @@ public:
/* Draw the accepted cargoes, if any. Otherwise, will print "Nothing". */
GetAllCargoSuffixes(CARGOSUFFIX_IN, CST_FUND, nullptr, this->selected_type, indsp, indsp->accepts_cargo, cargo_suffix);
std::string cargostring = this->MakeCargoListString(indsp->accepts_cargo, cargo_suffix, lengthof(indsp->accepts_cargo), STR_INDUSTRY_VIEW_REQUIRES_N_CARGO);
- y = DrawStringMultiLine(left, right, y, bottom, cargostring.c_str());
+ y = DrawStringMultiLine(left, right, y, bottom, cargostring);
/* Draw the produced cargoes, if any. Otherwise, will print "Nothing". */
GetAllCargoSuffixes(CARGOSUFFIX_OUT, CST_FUND, nullptr, this->selected_type, indsp, indsp->produced_cargo, cargo_suffix);
cargostring = this->MakeCargoListString(indsp->produced_cargo, cargo_suffix, lengthof(indsp->produced_cargo), STR_INDUSTRY_VIEW_PRODUCES_N_CARGO);
- y = DrawStringMultiLine(left, right, y, bottom, cargostring.c_str());
+ y = DrawStringMultiLine(left, right, y, bottom, cargostring);
/* Get the additional purchase info text, if it has not already been queried. */
if (HasBit(indsp->callback_mask, CBM_IND_FUND_MORE_TEXT)) {