src/ccstruct/blobs.cpp
void TBLOB::CorrectBlobOrder(TBLOB *next) {
  TBOX box = bounding_box();
  TBOX next_box = next->bounding_box();
  if (box.x_middle() > next_box.x_middle()) {
    std::swap(outlines, next->outlines);
  }
}
// Swaps the outlines of *this and next if needed to keep the centers in
// increasing x.
Swaps the outlines of *this and next if needed to keep the centers in
increasing x.
Swaps the outlines of * this and next if needed to keep the centers in increasing x .
void TBLOB::CorrectBlobOrder(TBLOB *next) {
  TBOX box = bounding_box();
  TBOX next_box = next->bounding_box();
  if (box.x_middle() > next_box.x_middle()) {
    std::swap(outlines, next->outlines);
  }
}
void TBLOB :: CorrectBlobOrder ( TBLOB * next ) { TBOX box = bounding_box ( ) ; TBOX next_box = next -> bounding_box ( ) ; if ( box . x_middle ( ) > next_box . x_middle ( ) ) { std :: swap ( outlines , next -> outlines ) ; } }
Swaps the outlines of *this and next if needed to keep the centers in
increasing x.
Swaps the outlines of * this and next if needed to keep the centers in increasing x .