Codechange: Use vector with unique_ptr instead of linked-list for base set lists. (#14332)

This commit is contained in:
Peter Nelson
2025-06-15 21:32:29 +01:00
committed by GitHub
parent e163aab892
commit cdd555edd5
5 changed files with 69 additions and 97 deletions

View File

@@ -268,7 +268,7 @@ template <>
if (BaseMedia<SoundsSet>::used_set != nullptr) return true;
const SoundsSet *best = nullptr;
for (const SoundsSet *c = BaseMedia<SoundsSet>::available_sets; c != nullptr; c = c->next) {
for (const auto &c : BaseMedia<SoundsSet>::available_sets) {
/* Skip unusable sets */
if (c->GetNumMissing() != 0) continue;
@@ -277,7 +277,7 @@ template <>
best->valid_files < c->valid_files ||
(best->valid_files == c->valid_files &&
(best->shortname == c->shortname && best->version < c->version))) {
best = c;
best = c.get();
}
}