| 1367 | */ |
| 1368 | template<class iterator, class oiterator> |
| 1369 | static dir_type |
| 1370 | align( |
| 1371 | const Lengths& lengths, |
| 1372 | iterator it1, |
| 1373 | iterator last1, |
| 1374 | iterator it2, |
| 1375 | iterator last2, |
| 1376 | oiterator& out) |
| 1377 | { |
| 1378 | assert(it1 != last1); |
| 1379 | assert(it2 != last2); |
| 1380 | while (it1 != last1 && it2 != last2) |
| 1381 | if (!alignOne(lengths, it1, last1, it2, last2, out)) |
| 1382 | return DIR_X; |
| 1383 | assert(it1 == last1 || it2 == last2); |
| 1384 | out = copy(it1, last1, out); |
| 1385 | out = copy(it2, last2, out); |
| 1386 | return it1 == last1 && it2 == last2 ? DIR_B |
| 1387 | : it1 == last1 ? DIR_F : it2 == last2 ? DIR_R : DIR_X; |
| 1388 | } |
| 1389 | |
| 1390 | /** Find an equivalent region of the two specified paths, starting the |
| 1391 | * alignment at pivot1 of path1 and pivot2 of path2. |
no test coverage detected