19 static constexpr uint32_t basis = 2166136261U;
20 static constexpr uint32_t prime = 16777619U;
23 constexpr uint32_t TBGetHash_one(
char c,
const char* remain, uint32_t value)
25 return c == 0 ? value : TBGetHash_one(remain[0], remain + 1, (value ^ c) * prime);
29 constexpr uint32_t TBGetHash(
const char* str)
31 return (str && *str) ? TBGetHash_one(str[0], str + 1, basis) : 0;
34 #define TBIDC(str) tb::TBGetHash(str)