Lines Matching refs:swaps
11513 // Let swaps be pieceIndex - compress.
11514 int swaps = piece_index - *compress;
11519 // While pieceIndex is not 0 and swaps is greater than 0,
11520 // swap address[pieceIndex] with address[compress + swaps - 1], and then
11521 // decrease both pieceIndex and swaps by 1.
11522 while (piece_index != 0 && swaps > 0) {
11523 std::swap(address[piece_index], address[*compress + swaps - 1]);
11525 swaps--;
14322 // Let swaps be pieceIndex - compress.
14323 int swaps = piece_index - *compress;
14328 // While pieceIndex is not 0 and swaps is greater than 0,
14329 // swap address[pieceIndex] with address[compress + swaps - 1], and then
14330 // decrease both pieceIndex and swaps by 1.
14331 while (piece_index != 0 && swaps > 0) {
14332 std::swap(address[piece_index], address[*compress + swaps - 1]);
14334 swaps--;