Codechange: remove a number of unneeded c_str() calls
This commit is contained in:
@@ -455,7 +455,7 @@ public:
|
||||
/* Measure the accepted cargoes, if any. */
|
||||
GetAllCargoSuffixes(CARGOSUFFIX_IN, CST_FUND, nullptr, indtype, 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);
|
||||
Dimension strdim = GetStringBoundingBox(cargostring.c_str());
|
||||
Dimension strdim = GetStringBoundingBox(cargostring);
|
||||
if (strdim.width > max_minwidth) {
|
||||
extra_lines_req = std::max(extra_lines_req, strdim.width / max_minwidth + 1);
|
||||
strdim.width = max_minwidth;
|
||||
@@ -465,7 +465,7 @@ public:
|
||||
/* Measure the produced cargoes, if any. */
|
||||
GetAllCargoSuffixes(CARGOSUFFIX_OUT, CST_FUND, nullptr, indtype, indsp, indsp->produced_cargo, cargo_suffix);
|
||||
cargostring = this->MakeCargoListString(indsp->produced_cargo, cargo_suffix, lengthof(indsp->produced_cargo), STR_INDUSTRY_VIEW_PRODUCES_N_CARGO);
|
||||
strdim = GetStringBoundingBox(cargostring.c_str());
|
||||
strdim = GetStringBoundingBox(cargostring);
|
||||
if (strdim.width > max_minwidth) {
|
||||
extra_lines_prd = std::max(extra_lines_prd, strdim.width / max_minwidth + 1);
|
||||
strdim.width = max_minwidth;
|
||||
|
Reference in New Issue
Block a user