| 1232 | } |
| 1233 | |
| 1234 | size_t lString16HashedCollection::find( const lChar16 * s ) |
| 1235 | { |
| 1236 | if ( !hash || !length() ) |
| 1237 | return (size_t)-1; |
| 1238 | lUInt32 h = calcStringHash( s ); |
| 1239 | lUInt32 n = h % hashSize; |
| 1240 | if ( hash[n].index!=-1 ) |
| 1241 | { |
| 1242 | const lString16 & str = at( hash[n].index ); |
| 1243 | if ( str == s ) |
| 1244 | return hash[n].index; |
| 1245 | HashPair * p = hash[n].next; |
| 1246 | for ( ;p ;p = p->next ) { |
| 1247 | const lString16 & str = at( p->index ); |
| 1248 | if ( str==s ) |
| 1249 | return p->index; |
| 1250 | } |
| 1251 | } |
| 1252 | return (size_t)-1; |
| 1253 | } |
| 1254 | |
| 1255 | void lString16HashedCollection::reHash( int newSize ) |
| 1256 | { |
nothing calls this directly
no test coverage detected