Codechange: Use std::vector for GRFConfig lists. (#10835)
This replaces the C-style custom managed linked-list and allows use of iterators etc.
This commit is contained in:
@@ -354,7 +354,7 @@ void SurveyTimers(nlohmann::json &survey)
|
||||
*/
|
||||
void SurveyGrfs(nlohmann::json &survey)
|
||||
{
|
||||
for (GRFConfig *c = _grfconfig; c != nullptr; c = c->next) {
|
||||
for (const auto &c : _grfconfig) {
|
||||
auto grfid = fmt::format("{:08x}", std::byteswap(c->ident.grfid));
|
||||
auto &grf = survey[grfid];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user