MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / ckpt_json_get_int

Function ckpt_json_get_int

common/script/json_api.cpp:122–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122void ckpt_json_get_int(struct ParseState* Parser, struct Value* ReturnValue, struct Value** Param, int NumArgs)
123{
124 const ScriptArgs args(Parser, Param, NumArgs, "json_get_int");
125 nlohmann::json* get = tree(args, 0);
126 if (!get->is_number()) {
127 args.fail("argument 1 is not a number");
128 }
129 ReturnValue->Val->Integer = get->get<int>();
130}
131
132void ckpt_json_get_bool(struct ParseState* Parser, struct Value* ReturnValue, struct Value** Param, int NumArgs)
133{

Callers

nothing calls this directly

Calls 2

treeFunction · 0.85
failMethod · 0.80

Tested by

no test coverage detected