| 7653 | static const xpath_node_set dummy_node_set; |
| 7654 | |
| 7655 | PUGI__FN unsigned int hash_string(const char_t* str) |
| 7656 | { |
| 7657 | // Jenkins one-at-a-time hash (http://en.wikipedia.org/wiki/Jenkins_hash_function#one-at-a-time) |
| 7658 | unsigned int result = 0; |
| 7659 | |
| 7660 | while (*str) |
| 7661 | { |
| 7662 | result += static_cast<unsigned int>(*str++); |
| 7663 | result += result << 10; |
| 7664 | result ^= result >> 6; |
| 7665 | } |
| 7666 | |
| 7667 | result += result << 3; |
| 7668 | result ^= result >> 11; |
| 7669 | result += result << 15; |
| 7670 | |
| 7671 | return result; |
| 7672 | } |
| 7673 | |
| 7674 | template <typename T> PUGI__FN T* new_xpath_variable(const char_t* name) |
| 7675 | { |