Codechange: Use {fmt} for script_admin JSON generation
This commit is contained in:
@@ -28,9 +28,7 @@
|
|||||||
SQInteger res;
|
SQInteger res;
|
||||||
sq_getinteger(vm, index, &res);
|
sq_getinteger(vm, index, &res);
|
||||||
|
|
||||||
char buf[10];
|
data = fmt::format("{}", res);
|
||||||
seprintf(buf, lastof(buf), "%d", (int32)res);
|
|
||||||
data = buf;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +42,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
data = std::string("\"") + buf + "\"";
|
data = fmt::format("\"{}\"", buf);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user