mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-09-03 22:59:30 +00:00
Codechange: Use {fmt} for script_admin JSON generation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user