MCPcopy Create free account
hub / github.com/WheretIB/nullc / xpath_first

Function xpath_first

external/pugixml/pugixml.cpp:6161–6180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6159 }
6160
6161 xpath_node xpath_first(const xpath_node* begin, const xpath_node* end, xpath_node_set::type_t type)
6162 {
6163 if (begin == end) return xpath_node();
6164
6165 switch (type)
6166 {
6167 case xpath_node_set::type_sorted:
6168 return *begin;
6169
6170 case xpath_node_set::type_sorted_reverse:
6171 return *(end - 1);
6172
6173 case xpath_node_set::type_unsorted:
6174 return *min_element(begin, end, document_order_comparator());
6175
6176 default:
6177 assert(!"Invalid node set type");
6178 return xpath_node();
6179 }
6180 }
6181 class xpath_node_set_raw
6182 {
6183 xpath_node_set::type_t _type;

Callers 2

firstMethod · 0.85
firstMethod · 0.85

Calls 4

xpath_nodeClass · 0.85
min_elementFunction · 0.85
assertFunction · 0.85

Tested by

no test coverage detected