--------------------------------------
| 167 | |
| 168 | //-------------------------------------- |
| 169 | StringTableEntry _StringTable::lookup(const char* val, const bool caseSens) |
| 170 | { |
| 171 | PROFILE_SCOPE(StringTableLookup); |
| 172 | |
| 173 | Node **walk, *temp; |
| 174 | U32 key = hashString(val); |
| 175 | walk = &buckets[key % numBuckets]; |
| 176 | while((temp = *walk) != NULL) { |
| 177 | if(caseSens && !dStrcmp(temp->val, val)) |
| 178 | return temp->val; |
| 179 | else if(!caseSens && !dStricmp(temp->val, val)) |
| 180 | return temp->val; |
| 181 | walk = &(temp->next); |
| 182 | } |
| 183 | return NULL; |
| 184 | } |
| 185 | |
| 186 | //-------------------------------------- |
| 187 | StringTableEntry _StringTable::lookupn(const char* val, S32 len, const bool caseSens) |
no test coverage detected