| 210 | } |
| 211 | |
| 212 | static uint32_t GetOrCacheNameHash(const char* name, uint32_t* pname_hash) |
| 213 | { |
| 214 | if (pname_hash) |
| 215 | { |
| 216 | uint32_t name_hash = *pname_hash; |
| 217 | if (!name_hash) |
| 218 | { |
| 219 | *pname_hash = HashString32(name); |
| 220 | } |
| 221 | return *pname_hash; |
| 222 | } |
| 223 | return HashString32(name); // No cache to store it in, so we have to recalculate each time |
| 224 | } |
| 225 | |
| 226 | static uint32_t InternalizeName(const char* original, uint32_t* pname_hash) |
| 227 | { |
no test coverage detected