mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-17 17:32:45 +01:00
Codechange: Prefer string equality instead of comparison. (#14727)
This commit is contained in:
@@ -507,7 +507,7 @@ std::tuple<FiosType, std::string> FiosGetHeightmapListCallback(SaveLoadOperation
|
||||
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) {
|
||||
if (it->second.tar_filename.starts_with(buf)) {
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user