src/ccstruct/points.cpp
bool ICOORD::DeSerialize(bool swap, FILE *fp) {
  if (!tesseract::DeSerialize(fp, &xcoord)) {
    return false;
  }
  if (!tesseract::DeSerialize(fp, &ycoord)) {
    return false;
  }
  if (swap) {
    ReverseN(&xcoord, sizeof(xcoord));
    ReverseN(&ycoord, sizeof(ycoord));
  }
  return true;
}
// Reads from the given file. Returns false in case of error.
// If swap is true, assumes a big/little-endian swap is needed.
Reads from the given file. Returns false in case of error.
If swap is true, assumes a big/little-endian swap is needed.
Reads from the given file . Returns false in case of error . If swap is true assumes a big / little - endian swap is needed .
bool ICOORD::DeSerialize(bool swap, FILE *fp) {
  if (!tesseract::DeSerialize(fp, &xcoord)) {
    return false;
  }
  if (!tesseract::DeSerialize(fp, &ycoord)) {
    return false;
  }
  if (swap) {
    ReverseN(&xcoord, sizeof(xcoord));
    ReverseN(&ycoord, sizeof(ycoord));
  }
  return true;
}
bool ICOORD :: DeSerialize ( bool swap , FILE * fp ) { if ( ! tesseract :: DeSerialize ( fp , & xcoord ) ) { return false ; } if ( ! tesseract :: DeSerialize ( fp , & ycoord ) ) { return false ; } if ( swap ) { ReverseN ( & xcoord , sizeof ( xcoord ) ) ; ReverseN ( & ycoord , sizeof ( ycoord ) ) ; } return true ; }
Reads from the given file.
Reads from the given file .