mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Use {fmt} for script_admin JSON generation
parent
ce8cde3b8d
commit
67a4c5e0db
|
@ -28,9 +28,7 @@
|
|||
SQInteger res;
|
||||
sq_getinteger(vm, index, &res);
|
||||
|
||||
char buf[10];
|
||||
seprintf(buf, lastof(buf), "%d", (int32)res);
|
||||
data = buf;
|
||||
data = fmt::format("{}", res);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -44,7 +42,7 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
data = std::string("\"") + buf + "\"";
|
||||
data = fmt::format("\"{}\"", buf);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue