Don't add the index, but just test if it is a part of the reindex. If it is an id which has already been added, return the new id, otherwise return -1
| 524 | // Don't add the index, but just test if it is a part of the reindex. If it is an |
| 525 | // id which has already been added, return the new id, otherwise return -1 |
| 526 | inline int testIndex( int id ) |
| 527 | { |
| 528 | computeIndices(); |
| 529 | int blockId = id / m_blockSize; |
| 530 | int subIndex = id % m_blockSize; |
| 531 | auto &block = m_fromOldIds[ blockId ]; |
| 532 | if( block ) |
| 533 | { |
| 534 | return (*block)[ subIndex ]; |
| 535 | } |
| 536 | else |
| 537 | { |
| 538 | return -1; |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | // Get the new indices. Call after calling addIndex for every original index |
| 543 | IntVectorDataPtr getNewIndices() |