| 1253 | } |
| 1254 | |
| 1255 | void lString16HashedCollection::reHash( int newSize ) |
| 1256 | { |
| 1257 | if ( hashSize == (lUInt32)newSize ) |
| 1258 | return; |
| 1259 | clearHash(); |
| 1260 | hashSize = newSize; |
| 1261 | if ( hashSize>0 ) { |
| 1262 | hash = (HashPair *)malloc( sizeof(HashPair) * hashSize ); |
| 1263 | for ( unsigned i=0; i<hashSize; i++ ) |
| 1264 | hash[i].clear(); |
| 1265 | } |
| 1266 | for ( unsigned i=0; i<length(); i++ ) { |
| 1267 | lUInt32 h = calcStringHash( at(i).c_str() ); |
| 1268 | lUInt32 n = h % hashSize; |
| 1269 | addHashItem( n, i ); |
| 1270 | } |
| 1271 | } |
| 1272 | |
| 1273 | size_t lString16HashedCollection::add( const lChar16 * s ) |
| 1274 | { |
nothing calls this directly
no test coverage detected