1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 10:22:39 +01:00

Codechange: Dereference with x-> instead of (*x). (#14700)

This commit is contained in:
Peter Nelson
2025-10-05 15:47:33 +01:00
committed by GitHub
parent c9fbc41636
commit a617d009cc
12 changed files with 19 additions and 19 deletions

View File

@@ -116,7 +116,7 @@ ScriptController::ScriptController(::CompanyID company) :
LoadedLibraryList::iterator it = controller.loaded_library.find(library_name);
if (it != controller.loaded_library.end()) {
fake_class = (*it).second;
fake_class = it->second;
} else {
int next_number = ++controller.loaded_library_count;

View File

@@ -54,7 +54,7 @@ ScriptError::ScriptErrorMapString ScriptError::error_map_string = ScriptError::S
ScriptErrorMap::iterator it = error_map.find(internal_string_id);
if (it == error_map.end()) return ERR_UNKNOWN;
return (*it).second;
return it->second;
}
/* static */ void ScriptError::RegisterErrorMap(StringID internal_string_id, ScriptErrorType ai_error_msg)

View File

@@ -85,7 +85,7 @@ int ScriptConfig::GetSetting(const std::string &name) const
{
const auto it = this->settings.find(name);
if (it == this->settings.end()) return this->info->GetSettingDefaultValue(name);
return (*it).second;
return it->second;
}
void ScriptConfig::SetSetting(std::string_view name, int value)