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

@@ -3073,7 +3073,7 @@ static std::pair<const SaveLoadFormat &, uint8_t> GetSavegameFormat(std::string_
std::string_view name = has_comp_level ? full_name.substr(0, separator) : full_name;
for (const auto &slf : _saveload_formats) {
if (slf.init_write != nullptr && name.compare(slf.name) == 0) {
if (slf.init_write != nullptr && name == slf.name) {
if (has_comp_level) {
auto complevel = full_name.substr(separator + 1);