diff --git a/textord/textlineprojection.cpp b/textord/textlineprojection.cpp index de457ba55..6018e5fda 100644 --- a/textord/textlineprojection.cpp +++ b/textord/textlineprojection.cpp @@ -751,11 +751,17 @@ void TextlineProjection::TransformToPixCoords(const DENORM* denorm, pt->y = ImageYToProjectionY(pt->y); } +#ifdef _MSC_VER +#pragma optimize("g", off) +#endif // _MSC_VER // Helper truncates the TPOINT to be within the pix_. void TextlineProjection::TruncateToImageBounds(TPOINT* pt) const { pt->x = ClipToRange(pt->x, 0, pixGetWidth(pix_) - 1); pt->y = ClipToRange(pt->y, 0, pixGetHeight(pix_) - 1); } +#ifdef _MSC_VER +#pragma optimize( "", on ) +#endif // _MSC_VER // Transform tesseract image coordinates to coordinates used in the projection. int TextlineProjection::ImageXToProjectionX(int x) const {