Codechange: Replace FOR_ALL_SEARCHPATHS with range-based for loops

(cherry picked from commit 983c7ade60)
This commit is contained in:
glx22
2021-04-30 15:41:58 +02:00
committed by Jonathan G Rennison
parent ffd30cf91b
commit 72cfb991e5
5 changed files with 22 additions and 29 deletions

View File

@@ -582,8 +582,7 @@ static FiosType FiosGetHeightmapListCallback(SaveLoadOperation fop, const std::s
* collections of NewGRFs or 32 bpp graphics replacement PNGs.
*/
bool match = false;
Searchpath sp;
FOR_ALL_SEARCHPATHS(sp) {
for (Searchpath sp : _valid_searchpaths) {
std::string buf = FioGetDirectory(sp, HEIGHTMAP_DIR);
if (buf.compare(0, buf.size(), it->second.tar_filename, 0, buf.size()) == 0) {