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

Function savArg

common/script/checkpoint_api.cpp:95–102  ·  view source on GitHub ↗

An open save-archive handle: a stale one (closed, or from a previous run) is as much a script bug as an out-of-range index.

Source from the content-addressed store, hash-verified

93 // An open save-archive handle: a stale one (closed, or from a previous run)
94 // is as much a script bug as an out-of-range index.
95 int savArg(const ScriptArgs& args, int i)
96 {
97 const int handle = args.num(i);
98 if (!host().savValid(handle)) {
99 args.fail("argument %d is %d, not an open save handle", i + 1, handle);
100 }
101 return handle;
102 }
103
104 std::string idToHex(uint64_t id)
105 {

Callers 5

ckpt_sav_readFunction · 0.85
ckpt_sav_writeFunction · 0.85
ckpt_sav_deleteFunction · 0.85
ckpt_sav_listFunction · 0.85
ckpt_sav_commitFunction · 0.85

Calls 3

numMethod · 0.80
failMethod · 0.80
savValidMethod · 0.45

Tested by

no test coverage detected