mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 06:30:14 +08:00
turn off optimisation in Microsoft Visual Studio for TextlineProjection::TruncateToImageBounds#pragma optimize( "", on )
fix issue 1496
This commit is contained in:
parent
bb19f2c16b
commit
9d359cf58a
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user