diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 11:49:19 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-01-10 17:11:46 +0100 |
commit | ae83e285473f703958c21e23b2a455e6646d8542 (patch) | |
tree | e0b27df9357c4cb25ed48aafde64d7270ff60f9a /include/basebmp | |
parent | Use bool (diff) | |
download | core-ae83e285473f703958c21e23b2a455e6646d8542.tar.gz core-ae83e285473f703958c21e23b2a455e6646d8542.zip |
Be explicit when using bool as integral value
Change-Id: I996608c4e5c533e6579aa2304ad57f066a1cb216
Diffstat (limited to 'include/basebmp')
-rw-r--r-- | include/basebmp/clippedlinerenderer.hxx | 12 | ||||
-rw-r--r-- | include/basebmp/polypolygonrenderer.hxx | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/basebmp/clippedlinerenderer.hxx b/include/basebmp/clippedlinerenderer.hxx index 92ca167730f5..acb9cdad48bc 100644 --- a/include/basebmp/clippedlinerenderer.hxx +++ b/include/basebmp/clippedlinerenderer.hxx @@ -85,11 +85,11 @@ inline bool prepareClip( sal_Int32 a1, } if( clipCount1 == 2 ) - clipCode1 &= (ca + da < cb + !bRoundTowardsPt2) ? ~(aMinFlag|aMaxFlag) : ~(bMinFlag|bMaxFlag); + clipCode1 &= (ca + da < cb + int(!bRoundTowardsPt2)) ? ~(aMinFlag|aMaxFlag) : ~(bMinFlag|bMaxFlag); if( clipCode1 & (aMinFlag|aMaxFlag) ) { - cb = (ca + da - !bRoundTowardsPt2) / (2*da); + cb = (ca + da - int(!bRoundTowardsPt2)) / (2*da); if( sb >= 0 ) { @@ -108,7 +108,7 @@ inline bool prepareClip( sal_Int32 a1, } else { - ca = (cb - da + 2*db - bRoundTowardsPt2) / (2*db); + ca = (cb - da + 2*db - int(bRoundTowardsPt2)) / (2*db); if( sa >= 0 ) { o_as = a1 + ca; @@ -136,7 +136,7 @@ inline bool prepareClip( sal_Int32 a1, { ca = 2*db*((clipCode2 & aMinFlag) ? a1 - aMin : aMax - a1); cb = 2*da*((clipCode2 & bMinFlag) ? b1 - bMin : bMax - b1); - clipCode2 &= (cb + da < ca + bRoundTowardsPt2) ? ~(aMinFlag|aMaxFlag) : ~(bMinFlag|bMaxFlag); + clipCode2 &= (cb + da < ca + int(bRoundTowardsPt2)) ? ~(aMinFlag|aMaxFlag) : ~(bMinFlag|bMaxFlag); } if( clipCode2 & (aMinFlag|aMaxFlag) ) @@ -249,7 +249,7 @@ void renderClippedLine( basegfx::B2IPoint aPt1, if( adx >= ady ) { // semi-horizontal line - sal_Int32 rem = 2*ady - adx - !bRoundTowardsPt2; + sal_Int32 rem = 2*ady - adx - int(!bRoundTowardsPt2); if( !prepareClip(x1, x2, y1, adx, ady, xs, ys, sx, sy, rem, n, clipCode1, clipCount1, clipCode2, clipCount2, @@ -327,7 +327,7 @@ void renderClippedLine( basegfx::B2IPoint aPt1, else { // semi-vertical line - sal_Int32 rem = 2*adx - ady - !bRoundTowardsPt2; + sal_Int32 rem = 2*adx - ady - int(!bRoundTowardsPt2); if( !prepareClip(y1, y2, x1, ady, adx, ys, xs, sy, sx, rem, n, clipCode1, clipCount1, clipCode2, clipCount2, diff --git a/include/basebmp/polypolygonrenderer.hxx b/include/basebmp/polypolygonrenderer.hxx index 09bd18adc493..eeb0d477416f 100644 --- a/include/basebmp/polypolygonrenderer.hxx +++ b/include/basebmp/polypolygonrenderer.hxx @@ -236,7 +236,7 @@ namespace basebmp detail::Vertex& rV1( **currVertex ); detail::Vertex const& rV2( **++currVertex ); - nWindingNumber += -1 + 2*rV1.mbDownwards; + nWindingNumber += -1 + 2*int(rV1.mbDownwards); // calc fill status for both rules. might save a // few percent runtime to specialize here... |