MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / CreateString

Method CreateString

Util/src/InfoTree/InfoTree.cpp:47–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47InfoNode InfoTree::CreateString(std::string s) {
48 auto nodeIndex = _nodeOrInfos.size();
49 auto valueIndex = _stringValues.size();
50 _stringValues.emplace_back(s);
51
52 InfoOrNode n;
53 n.Kind = InfoKind::String;
54 n.Data.StringIndex = valueIndex;
55 _nodeOrInfos.push_back(n);
56
57 return InfoNode(nodeIndex, this);
58}
59
60InfoNode InfoTree::CreateBool(bool b) {
61 auto nodeIndex = _nodeOrInfos.size();

Callers 3

CreateFromLuaFunction · 0.80
AddChildMethod · 0.80
CreateFromJsonFunction · 0.80

Calls 3

InfoNodeClass · 0.85
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected