| 330 | } |
| 331 | |
| 332 | void RehashStep() |
| 333 | { |
| 334 | if (cfPauseRehash) |
| 335 | return; |
| 336 | |
| 337 | int steps = 0; |
| 338 | for (; idxRehash < (m_data.size()/2); ++idxRehash) |
| 339 | { |
| 340 | if (m_data[idxRehash] == nullptr) |
| 341 | continue; |
| 342 | |
| 343 | CowPtr<vector_type> spvecT; |
| 344 | std::swap(m_data[idxRehash], spvecT); |
| 345 | |
| 346 | for (const auto &v : *spvecT) |
| 347 | insert(v, true); |
| 348 | |
| 349 | if (++steps > 1024) |
| 350 | break; |
| 351 | } |
| 352 | } |
| 353 | |
| 354 | void grow() |
| 355 | { |