From 9d359cf58a920ad068a3a4b159e6c3e3b0511f8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zdenko=20Podobn=C3=BD?= Date: Sun, 16 Aug 2015 21:38:41 +0200 Subject: [PATCH] turn off optimisation in Microsoft Visual Studio for TextlineProjection::TruncateToImageBounds#pragma optimize( "", on ) fix issue 1496 --- textord/textlineprojection.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/textord/textlineprojection.cpp b/textord/textlineprojection.cpp index de457ba55b..6018e5fdaa 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 {