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:
Peter Nelson
2025-01-31 17:09:09 +00:00
committed by GitHub
parent 40aeedeade
commit 5664b1e2f6
23 changed files with 248 additions and 384 deletions

View File

@@ -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];