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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user