Codechange: [Network] Use std::string to get a NewGRF's name

This commit is contained in:
rubidium42
2021-05-30 13:34:58 +02:00
committed by rubidium42
parent 849a10520c
commit ab9b937ab7
3 changed files with 5 additions and 6 deletions

View File

@@ -539,10 +539,10 @@ void AddGRFTextToList(GRFTextWrapper &list, byte langid, uint32 grfid, bool allo
* @param list The list where the text should be added to.
* @param text_to_add The text to add to the list.
*/
void AddGRFTextToList(GRFTextWrapper &list, const char *text_to_add)
void AddGRFTextToList(GRFTextWrapper &list, const std::string &text_to_add)
{
if (!list) list.reset(new GRFTextList());
AddGRFTextToList(*list, GRFLX_UNSPECIFIED, std::string(text_to_add));
AddGRFTextToList(*list, GRFLX_UNSPECIFIED, text_to_add);
}
/**