| 6777 | } |
| 6778 | |
| 6779 | PUGI__FN xpath_node xpath_first(const xpath_node* begin, const xpath_node* end, xpath_node_set::type_t type) |
| 6780 | { |
| 6781 | if (begin == end) return xpath_node(); |
| 6782 | |
| 6783 | switch (type) |
| 6784 | { |
| 6785 | case xpath_node_set::type_sorted: |
| 6786 | return *begin; |
| 6787 | |
| 6788 | case xpath_node_set::type_sorted_reverse: |
| 6789 | return *(end - 1); |
| 6790 | |
| 6791 | case xpath_node_set::type_unsorted: |
| 6792 | return *min_element(begin, end, document_order_comparator()); |
| 6793 | |
| 6794 | default: |
| 6795 | assert(!"Invalid node set type"); |
| 6796 | return xpath_node(); |
| 6797 | } |
| 6798 | } |
| 6799 | |
| 6800 | class xpath_node_set_raw |
| 6801 | { |
nothing calls this directly
no test coverage detected