| 3289 | } |
| 3290 | |
| 3291 | uint32_t String::hash(const char* p_cstr) |
| 3292 | { |
| 3293 | uint32_t hashv = 5381; |
| 3294 | uint32_t c = *p_cstr++; |
| 3295 | |
| 3296 | while (c) |
| 3297 | { |
| 3298 | hashv = ((hashv << 5) + hashv) + c; /* hash * 33 + c */ |
| 3299 | c = *p_cstr++; |
| 3300 | } |
| 3301 | |
| 3302 | return hashv; |
| 3303 | } |
| 3304 | |
| 3305 | uint32_t String::hash(const char* p_cstr, int p_len) |
| 3306 | { |
no test coverage detected