From ebae963884ff0dfd8004395ac898f3578b4279a8 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 2 Feb 2017 21:01:28 +0300 Subject: [PATCH] drawing: workaround MSVC2010 32-bit compiler bug --- modules/core/src/drawing.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/core/src/drawing.cpp b/modules/core/src/drawing.cpp index d0b6fb13b1..91baec29d5 100644 --- a/modules/core/src/drawing.cpp +++ b/modules/core/src/drawing.cpp @@ -1185,8 +1185,12 @@ FillConvexPoly( Mat& img, const Point2l* v, int npts, const void* color, int lin edges--; } - xs <<= XY_SHIFT - shift; - xe = v[idx].x << (XY_SHIFT - shift); + xe = v[idx].x; + if (XY_SHIFT - shift != 0) + { + xs <<= XY_SHIFT - shift; + xe <<= XY_SHIFT - shift; + } /* no more edges */ if( y >= ty)