diff --git a/src/newgrf.cpp b/src/newgrf.cpp --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -8372,13 +8372,13 @@ static bool ChangeGRFParamValueNames(Byt byte langid = buf->ReadByte(); const char *name_string = buf->ReadString(); - std::pair *val_name = _cur_parameter->value_names.Find(id); - if (val_name != _cur_parameter->value_names.End()) { + auto val_name = _cur_parameter->value_names.find(id); + if (val_name != _cur_parameter->value_names.end()) { AddGRFTextToList(val_name->second, langid, _cur.grfconfig->ident.grfid, false, name_string); } else { GRFTextList list; AddGRFTextToList(list, langid, _cur.grfconfig->ident.grfid, false, name_string); - _cur_parameter->value_names.Insert(id, list); + _cur_parameter->value_names[id] = list; } type = buf->ReadByte();