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

Method GetValue

Util/src/InfoTree/InfoNode.cpp:153–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153InfoNode InfoNode::GetValue(std::string_view key) const {
154 if (_index < _tree->_nodeOrInfos.size()) {
155 auto &node = _tree->_nodeOrInfos[_index];
156 if (node.Kind == InfoKind::Object) {
157 auto &umap = _tree->_mapChildren[node.Data.ChildIndex];
158 std::string keyString(key);
159 auto it = umap.find(keyString);
160 if (it != umap.end()) {
161 return InfoNode(it->second, _tree);
162 }
163 }
164 }
165 return InfoNode(0, _tree);
166}

Callers 2

MakeNameStyleFunction · 0.80
ParseTreeMethod · 0.80

Calls 4

InfoNodeClass · 0.85
sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected