summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-04-30 15:41:58 +0200
committerLoïc Guilloux <glx22@users.noreply.github.com>2021-05-03 19:46:57 +0200
commit983c7ade60f82a49d8c23c1f295add1fd9a913b0 (patch)
tree879eace14cb5fa56c407fbd3c0b5a04fa6a808e2 /src/script
parent34215f7faa2de08d767b4f6945443a8f3175acbf (diff)
downloadopenttd-983c7ade60f82a49d8c23c1f295add1fd9a913b0.tar.xz
Codechange: Replace FOR_ALL_SEARCHPATHS with range-based for loops
Diffstat (limited to 'src/script')
-rw-r--r--src/script/script_instance.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/script_instance.cpp b/src/script/script_instance.cpp
index f7f9de4fc..fadbba70d 100644
--- a/src/script/script_instance.cpp
+++ b/src/script/script_instance.cpp
@@ -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;