Codechange: Use range-for to iterate base media files. (#12721)

This commit is contained in:
Peter Nelson
2024-05-26 16:46:18 +01:00
committed by GitHub
parent 3c42f701d7
commit 517dab35b1
3 changed files with 7 additions and 7 deletions

View File

@@ -325,8 +325,8 @@ template <class Tbase_set> const char *TryGetBaseSetFile(const ContentInfo *ci,
if (!md5sum) return s->files[0].filename.c_str();
MD5Hash md5;
for (uint i = 0; i < Tbase_set::NUM_FILES; i++) {
md5 ^= s->files[i].hash;
for (const auto &file : s->files) {
md5 ^= file.hash;
}
if (md5 == ci->md5sum) return s->files[0].filename.c_str();
}