mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-06-11 04:33:20 +08:00
turn off optimisation in Microsoft Visual Studio for TextlineProjection::TruncateToImageBounds#pragma optimize( "", on )
fix issue 1496
This commit is contained in:
parent
f7fd63efea
commit
b4b2aaee80
@ -751,11 +751,17 @@ void TextlineProjection::TransformToPixCoords(const DENORM* denorm,
|
|||||||
pt->y = ImageYToProjectionY(pt->y);
|
pt->y = ImageYToProjectionY(pt->y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma optimize("g", off)
|
||||||
|
#endif // _MSC_VER
|
||||||
// Helper truncates the TPOINT to be within the pix_.
|
// Helper truncates the TPOINT to be within the pix_.
|
||||||
void TextlineProjection::TruncateToImageBounds(TPOINT* pt) const {
|
void TextlineProjection::TruncateToImageBounds(TPOINT* pt) const {
|
||||||
pt->x = ClipToRange<int>(pt->x, 0, pixGetWidth(pix_) - 1);
|
pt->x = ClipToRange<int>(pt->x, 0, pixGetWidth(pix_) - 1);
|
||||||
pt->y = ClipToRange<int>(pt->y, 0, pixGetHeight(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.
|
// Transform tesseract image coordinates to coordinates used in the projection.
|
||||||
int TextlineProjection::ImageXToProjectionX(int x) const {
|
int TextlineProjection::ImageXToProjectionX(int x) const {
|
||||||
|
Loading…
Reference in New Issue
Block a user