MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / readNode

Function readNode

framework/modinfo.cpp:11–18  ·  view source on GitHub ↗

Returns the value if "nodeName" child exists, else empty string

Source from the content-addressed store, hash-verified

9
10// Returns the value if "nodeName" child exists, else empty string
11static UString readNode(const char *nodeName, const xml_node &node)
12{
13 auto childNode = node.child(nodeName);
14 if (childNode)
15 return childNode.text().get();
16 else
17 return "";
18}
19
20std::optional<ModInfo> ModInfo::getInfo(const UString &path)
21{

Callers 1

getInfoMethod · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected