| 50 | } // namespace {} |
| 51 | |
| 52 | U32 _StringTable::hashString(const char* str) |
| 53 | { |
| 54 | if (sgInitTable) |
| 55 | initTolowerTable(); |
| 56 | |
| 57 | if(!str) return -1; |
| 58 | |
| 59 | U32 ret = 0; |
| 60 | char c; |
| 61 | while((c = *str++) != 0) { |
| 62 | ret <<= 1; |
| 63 | ret ^= sgHashTable[static_cast<U8>(c)]; |
| 64 | } |
| 65 | return ret; |
| 66 | } |
| 67 | |
| 68 | U32 _StringTable::hashStringn(const char* str, S32 len) |
| 69 | { |
nothing calls this directly
no test coverage detected