| 6649 | static const xpath_node_set dummy_node_set; |
| 6650 | |
| 6651 | PUGI__FN unsigned int hash_string(const char_t* str) |
| 6652 | { |
| 6653 | // Jenkins one-at-a-time hash (http://en.wikipedia.org/wiki/Jenkins_hash_function#one-at-a-time) |
| 6654 | unsigned int result = 0; |
| 6655 | |
| 6656 | while (*str) |
| 6657 | { |
| 6658 | result += static_cast<unsigned int>(*str++); |
| 6659 | result += result << 10; |
| 6660 | result ^= result >> 6; |
| 6661 | } |
| 6662 | |
| 6663 | result += result << 3; |
| 6664 | result ^= result >> 11; |
| 6665 | result += result << 15; |
| 6666 | |
| 6667 | return result; |
| 6668 | } |
| 6669 | |
| 6670 | template <typename T> PUGI__FN T* new_xpath_variable(const char_t* name) |
| 6671 | { |