MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenImageIO / hash_string

Function hash_string

src/include/pugixml.cpp:6651–6668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 2

findMethod · 0.85
addMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected