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

Method AsArray

Util/src/InfoTree/InfoNode.cpp:126–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126std::vector<InfoNode> InfoNode::AsArray() const {
127 std::vector<InfoNode> result;
128 if (_index < _tree->_nodeOrInfos.size()) {
129 auto &node = _tree->_nodeOrInfos[_index];
130 if (node.Kind == InfoKind::Array) {
131 for (auto i: _tree->_arrayChildren[node.Data.ChildIndex]) {
132 result.emplace_back(i, _tree);
133 }
134 }
135 }
136 return result;
137}
138
139std::unordered_map<std::string, InfoNode> InfoNode::AsMap() const {
140 std::unordered_map<std::string, InfoNode> umap;

Callers 2

MakeNameStyleFunction · 0.80
ParseTreeMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected