turn off optimisation in Microsoft Visual Studio for TextlineProjection::TruncateToImageBounds#pragma optimize( "", on )

fix issue 1496
This commit is contained in:
Zdenko Podobný 2015-08-16 21:38:41 +02:00
parent bb19f2c16b
commit 9d359cf58a

View File

@ -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<int>(pt->x, 0, pixGetWidth(pix_) - 1);
pt->y = ClipToRange<int>(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 {