Be explicit when using bool as integral value

Change-Id: I3a6b9df9b1b6c48d5db506942d651f66cefdaa18
This commit is contained in:
Stephan Bergmann
2014-01-10 17:35:25 +01:00
parent 340e70e248
commit fe23abd381
4 changed files with 13 additions and 13 deletions

View File

@@ -983,7 +983,7 @@ namespace cairocanvas
// to correctly render closed curves, need to output first // to correctly render closed curves, need to output first
// point twice (so output one additional point) // point twice (so output one additional point)
const sal_uInt32 nExtendedPointCount( nPointCount + const sal_uInt32 nExtendedPointCount( nPointCount +
aPolygon.isClosed()*aPolygon.areControlPointsUsed() ); int(aPolygon.isClosed() && aPolygon.areControlPointsUsed()) );
if( nPointCount > 1) if( nPointCount > 1)
{ {

View File

@@ -69,7 +69,7 @@ namespace oglcanvas
const ::basegfx::B2DPolygon& rPolygon( aPolyPoly.getB2DPolygon(i) ); const ::basegfx::B2DPolygon& rPolygon( aPolyPoly.getB2DPolygon(i) );
const sal_uInt32 nPts=rPolygon.count(); 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++ ) for( sal_uInt32 j=0; j<nExtPts; j++ )
{ {
const ::basegfx::B2DPoint& rPt( rPolygon.getB2DPoint( j % nPts ) ); const ::basegfx::B2DPoint& rPt( rPolygon.getB2DPoint( j % nPts ) );

View File

@@ -215,12 +215,12 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
const sal_Int32 nBinaryState( const sal_Int32 nBinaryState(
100000 * !::rtl::math::isFinite( matrix.m00 ) + 100000 * int(!::rtl::math::isFinite( matrix.m00 )) +
10000 * !::rtl::math::isFinite( matrix.m01 ) + 10000 * int(!::rtl::math::isFinite( matrix.m01 )) +
1000 * !::rtl::math::isFinite( matrix.m02 ) + 1000 * int(!::rtl::math::isFinite( matrix.m02 )) +
100 * !::rtl::math::isFinite( matrix.m10 ) + 100 * int(!::rtl::math::isFinite( matrix.m10 )) +
10 * !::rtl::math::isFinite( matrix.m11 ) + 10 * int(!::rtl::math::isFinite( matrix.m11 )) +
1 * !::rtl::math::isFinite( matrix.m12 ) ); 1 * int(!::rtl::math::isFinite( matrix.m12 )) );
if( nBinaryState ) if( nBinaryState )
{ {
@@ -252,10 +252,10 @@ namespace canvas
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
const sal_Int32 nBinaryState( const sal_Int32 nBinaryState(
1000 * !::rtl::math::isFinite( matrix.m00 ) + 1000 * int(!::rtl::math::isFinite( matrix.m00 )) +
100 * !::rtl::math::isFinite( matrix.m01 ) + 100 * int(!::rtl::math::isFinite( matrix.m01 )) +
10 * !::rtl::math::isFinite( matrix.m10 ) + 10 * int(!::rtl::math::isFinite( matrix.m10 )) +
1 * !::rtl::math::isFinite( matrix.m11 ) ); 1 * int(!::rtl::math::isFinite( matrix.m11 )) );
if( nBinaryState ) if( nBinaryState )
{ {

View File

@@ -26,7 +26,7 @@ namespace vclcanvas
BackBuffer::BackBuffer( const OutputDevice& rRefDevice, BackBuffer::BackBuffer( const OutputDevice& rRefDevice,
bool bMonochromeBuffer ) : bool bMonochromeBuffer ) :
maVDev( new VirtualDevice( rRefDevice, maVDev( new VirtualDevice( rRefDevice,
bMonochromeBuffer ) ) sal_uInt16(bMonochromeBuffer) ) )
{ {
if( !bMonochromeBuffer ) if( !bMonochromeBuffer )
{ {