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

Function hash_string

external/pugixml/pugixml.cpp:6028–6045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6026 const xpath_node_set dummy_node_set;
6027
6028 unsigned int hash_string(const char_t* str)
6029 {
6030 // Jenkins one-at-a-time hash (http://en.wikipedia.org/wiki/Jenkins_hash_function#one-at-a-time)
6031 unsigned int result = 0;
6032
6033 while (*str)
6034 {
6035 result += static_cast<unsigned int>(*str++);
6036 result += result << 10;
6037 result ^= result >> 6;
6038 }
6039
6040 result += result << 3;
6041 result ^= result >> 11;
6042 result += result << 15;
6043
6044 return result;
6045 }
6046
6047 template <typename T> T* new_xpath_variable(const char_t* name)
6048 {

Callers 2

findMethod · 0.85
addMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected