MCPcopy Create free account
hub / github.com/MyGUI/mygui / hash_string

Function hash_string

Tools/EditorFramework/pugixml.cpp:7378–7395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7376static const xpath_node_set dummy_node_set;
7377
7378PUGI__FN unsigned int hash_string(const char_t* str)
7379{
7380 // Jenkins one-at-a-time hash (http://en.wikipedia.org/wiki/Jenkins_hash_function#one-at-a-time)
7381 unsigned int result = 0;
7382
7383 while (*str)
7384 {
7385 result += static_cast<unsigned int>(*str++);
7386 result += result << 10;
7387 result ^= result >> 6;
7388 }
7389
7390 result += result << 3;
7391 result ^= result >> 11;
7392 result += result << 15;
7393
7394 return result;
7395}
7396
7397template<typename T>
7398PUGI__FN T* new_xpath_variable(const char_t* name)

Callers 2

findMethod · 0.70
addMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected