summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index d533db1fc..e340a2b1c 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -1171,8 +1171,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
CargoTypes cmask = args->GetInt64(SCC_CARGO_LIST);
bool first = true;
- const CargoSpec *cs;
- FOR_ALL_SORTED_CARGOSPECS(cs) {
+ for (const auto &cs : _sorted_cargo_specs) {
if (!HasBit(cmask, cs->Index())) continue;
if (buff >= last - 2) break; // ',' and ' '