Codechange: Replace FOR_ALL_SEARCHPATHS with range-based for loops

This commit is contained in:
glx22
2021-04-30 15:41:58 +02:00
committed by Loïc Guilloux
parent 34215f7faa
commit 983c7ade60
5 changed files with 22 additions and 29 deletions

View File

@@ -116,8 +116,7 @@ bool ScriptInstance::LoadCompatibilityScripts(const char *api_version, Subdirect
{
char script_name[32];
seprintf(script_name, lastof(script_name), "compat_%s.nut", api_version);
Searchpath sp;
FOR_ALL_SEARCHPATHS(sp) {
for (Searchpath sp : _valid_searchpaths) {
std::string buf = FioGetDirectory(sp, dir);
buf += script_name;
if (!FileExists(buf)) continue;