1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-21 03:12:41 +01:00

Codechange: replace some more char*s with std::string_view

This commit is contained in:
Rubidium
2025-04-30 20:56:54 +02:00
committed by rubidium42
parent a80c11a6e8
commit 855377191e
5 changed files with 17 additions and 19 deletions

View File

@@ -1835,7 +1835,7 @@ struct StationViewWindow : public Window {
DrawString(text.left, text.right, y, GetString(str, cargo, cd.GetCount(), station));
if (column < NUM_COLUMNS - 1) {
const char *sym = nullptr;
std::string_view sym;
if (cd.GetNumChildren() > 0) {
sym = "-";
} else if (auto_distributed && str != STR_STATION_VIEW_RESERVED) {
@@ -1850,7 +1850,7 @@ struct StationViewWindow : public Window {
}
}
}
if (sym != nullptr) DrawString(shrink.left, shrink.right, y, sym, TC_YELLOW);
if (!sym.empty()) DrawString(shrink.left, shrink.right, y, sym, TC_YELLOW);
}
this->SetDisplayedRow(cd);
}