MCPcopy Create free account
hub / github.com/InoriRus/Kyty / LoadInt

Function LoadInt

source/emulator/src/Config.cpp:48–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46
47template <class T>
48void LoadInt(T& dst, const Scripts::ScriptVar& cfg, const String& key)
49{
50 auto var = cfg.At(key);
51 if (!var.IsNil())
52 {
53 dst = static_cast<T>(var.ToInteger());
54 }
55}
56
57void LoadBool(bool& dst, const Scripts::ScriptVar& cfg, const String& key)
58{

Callers 1

LoadFunction · 0.70

Calls 3

AtMethod · 0.80
IsNilMethod · 0.80
ToIntegerMethod · 0.80

Tested by

no test coverage detected