#include <util.h>
Definition at line 31 of file util.h.
◆ operator()()
size_t StringHash::operator() |
( |
const std::string & |
s | ) |
const |
|
inline |
Definition at line 32 of file util.h.
32 {
33 size_t hash_code = 0;
34 const uint8_t* str = reinterpret_cast<const uint8_t*>(s.c_str());
35 for (unsigned ch = 0; str[ch] != 0; ++ch) {
36 hash_code += str[ch] << (ch % 24);
37 }
38 return hash_code;
39 }
The documentation for this struct was generated from the following file: