Codechange: Prefer string equality instead of comparison. (#14727)

This commit is contained in:
Peter Nelson
2025-10-24 20:30:03 +01:00
committed by dP
parent 596e347d14
commit de9984f379
15 changed files with 37 additions and 44 deletions

View File

@@ -1548,7 +1548,7 @@ StringList GetGRFPresetList()
ConfigIniFile ini(_config_file);
for (const IniGroup &group : ini.groups) {
if (group.name.compare(0, 7, "preset-") == 0) {
if (group.name.starts_with("preset-")) {
list.push_back(group.name.substr(7));
}
}