[Libreoffice-commits] core.git: canvas/source

Stephan Bergmann sbergman at redhat.com
Fri Jan 10 08:36:32 PST 2014


 canvas/source/cairo/cairo_canvashelper.cxx |    2 +-
 canvas/source/opengl/ogl_canvastools.cxx   |    2 +-
 canvas/source/tools/verifyinput.cxx        |   20 ++++++++++----------
 canvas/source/vcl/backbuffer.cxx           |    2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit fe23abd3812e08015facbbb2eb725dd990d63fa0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jan 10 17:35:25 2014 +0100

    Be explicit when using bool as integral value
    
    Change-Id: I3a6b9df9b1b6c48d5db506942d651f66cefdaa18

diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index 34886b0..8121a0d 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -983,7 +983,7 @@ namespace cairocanvas
             // to correctly render closed curves, need to output first
             // point twice (so output one additional point)
             const sal_uInt32 nExtendedPointCount( nPointCount +
-                                                  aPolygon.isClosed()*aPolygon.areControlPointsUsed() );
+                                                  int(aPolygon.isClosed() && aPolygon.areControlPointsUsed()) );
 
             if( nPointCount > 1)
             {
diff --git a/canvas/source/opengl/ogl_canvastools.cxx b/canvas/source/opengl/ogl_canvastools.cxx
index a3a73db..36693f3 100644
--- a/canvas/source/opengl/ogl_canvastools.cxx
+++ b/canvas/source/opengl/ogl_canvastools.cxx
@@ -69,7 +69,7 @@ namespace oglcanvas
             const ::basegfx::B2DPolygon& rPolygon( aPolyPoly.getB2DPolygon(i) );
 
             const sal_uInt32 nPts=rPolygon.count();
-            const sal_uInt32 nExtPts=nPts + rPolygon.isClosed();
+            const sal_uInt32 nExtPts=nPts + int(rPolygon.isClosed());
             for( sal_uInt32 j=0; j<nExtPts; j++ )
             {
                 const ::basegfx::B2DPoint& rPt( rPolygon.getB2DPoint( j % nPts ) );
diff --git a/canvas/source/tools/verifyinput.cxx b/canvas/source/tools/verifyinput.cxx
index 48fdad5..0c7dbca 100644
--- a/canvas/source/tools/verifyinput.cxx
+++ b/canvas/source/tools/verifyinput.cxx
@@ -215,12 +215,12 @@ namespace canvas
 
 #if OSL_DEBUG_LEVEL > 0
             const sal_Int32 nBinaryState(
-                100000 * !::rtl::math::isFinite( matrix.m00 ) +
-                 10000 * !::rtl::math::isFinite( matrix.m01 ) +
-                  1000 * !::rtl::math::isFinite( matrix.m02 ) +
-                   100 * !::rtl::math::isFinite( matrix.m10 ) +
-                    10 * !::rtl::math::isFinite( matrix.m11 ) +
-                     1 * !::rtl::math::isFinite( matrix.m12 ) );
+                100000 * int(!::rtl::math::isFinite( matrix.m00 )) +
+                 10000 * int(!::rtl::math::isFinite( matrix.m01 )) +
+                  1000 * int(!::rtl::math::isFinite( matrix.m02 )) +
+                   100 * int(!::rtl::math::isFinite( matrix.m10 )) +
+                    10 * int(!::rtl::math::isFinite( matrix.m11 )) +
+                     1 * int(!::rtl::math::isFinite( matrix.m12 )) );
 
             if( nBinaryState )
             {
@@ -252,10 +252,10 @@ namespace canvas
 
 #if OSL_DEBUG_LEVEL > 0
             const sal_Int32 nBinaryState(
-                1000 * !::rtl::math::isFinite( matrix.m00 ) +
-                 100 * !::rtl::math::isFinite( matrix.m01 ) +
-                  10 * !::rtl::math::isFinite( matrix.m10 ) +
-                   1 * !::rtl::math::isFinite( matrix.m11 ) );
+                1000 * int(!::rtl::math::isFinite( matrix.m00 )) +
+                 100 * int(!::rtl::math::isFinite( matrix.m01 )) +
+                  10 * int(!::rtl::math::isFinite( matrix.m10 )) +
+                   1 * int(!::rtl::math::isFinite( matrix.m11 )) );
 
             if( nBinaryState )
             {
diff --git a/canvas/source/vcl/backbuffer.cxx b/canvas/source/vcl/backbuffer.cxx
index 2666c61..73d6320 100644
--- a/canvas/source/vcl/backbuffer.cxx
+++ b/canvas/source/vcl/backbuffer.cxx
@@ -26,7 +26,7 @@ namespace vclcanvas
     BackBuffer::BackBuffer( const OutputDevice& rRefDevice,
                             bool                bMonochromeBuffer ) :
         maVDev( new VirtualDevice( rRefDevice,
-                                   bMonochromeBuffer ) )
+                                   sal_uInt16(bMonochromeBuffer) ) )
     {
         if( !bMonochromeBuffer )
         {


More information about the Libreoffice-commits mailing list