Codechange: use std::string to create the GRF parameter list

This commit is contained in:
Rubidium
2023-05-24 22:46:22 +02:00
committed by rubidium42
parent fbab94eabb
commit 4fdde00e25
4 changed files with 10 additions and 18 deletions

View File

@@ -112,10 +112,9 @@ static void ShowNewGRFInfo(const GRFConfig *c, const Rect &r, bool show_params)
/* Show GRF parameter list */
if (show_params) {
if (c->num_params > 0) {
char buff[256];
GRFBuildParamList(buff, c, lastof(buff));
std::string params = GRFBuildParamList(c);
SetDParam(0, STR_JUST_RAW_STRING);
SetDParamStr(1, buff);
SetDParamStr(1, params);
} else {
SetDParam(0, STR_NEWGRF_SETTINGS_PARAMETER_NONE);
}