vcl/ios/source/gdi/salbmp.cxx |4 +--
vcl/ios/source/gdi/salcoretextstyle.cxx |2 -
vcl/ios/source/gdi/salgdicommon.cxx | 34
vcl/ios/source/gdi/salvd.cxx|2 -
vcl/ios/source/window/salframe.cxx |2 -
vcl/ios/source/window/salobj.cxx|4 +--
6 files changed, 24 insertions(+), 24 deletions(-)
New commits:
commit 305ccd4f4754e47de021b38081729c30f161bef5
Author: Tor Lillqvist t...@iki.fi
Date: Sun Dec 23 01:07:15 2012 +0200
WaE: non-constant-expression cannot be narrowed
Change-Id: I401fd149e62d74a96edfc2a7e5105fb2cc95f0c7
diff --git a/vcl/ios/source/gdi/salbmp.cxx b/vcl/ios/source/gdi/salbmp.cxx
index 201c918..4bd1d45 100644
--- a/vcl/ios/source/gdi/salbmp.cxx
+++ b/vcl/ios/source/gdi/salbmp.cxx
@@ -88,7 +88,7 @@ bool IosSalBitmap::Create( CGLayerRef xLayer, int nBitmapBits,
CreateContext();
// copy layer content into the bitmap buffer
-const CGPoint aSrcPoint = { -nX, -nY };
+const CGPoint aSrcPoint = { static_castCGFloat(-nX),
static_castCGFloat(-nY) };
::CGContextDrawLayerAtPoint( mxGraphicContext, aSrcPoint, xLayer );
return true;
}
@@ -731,7 +731,7 @@ CGImageRef IosSalBitmap::CreateCroppedImage( int nX, int
nY, int nNewWidth, int
else
{
nY = mnHeight - (nY + nNewHeight); // adjust for y-mirrored context
-const CGRect aCropRect = {{nX, nY}, {nNewWidth, nNewHeight}};
+const CGRect aCropRect = { { static_castCGFloat(nX),
static_castCGFloat(nY)}, { static_castCGFloat(nNewWidth),
static_castCGFloat(nNewHeight) } };
xCroppedImage = CGImageCreateWithImageInRect( mxCachedImage, aCropRect
);
}
diff --git a/vcl/ios/source/gdi/salcoretextstyle.cxx
b/vcl/ios/source/gdi/salcoretextstyle.cxx
index 6b49e23..46d11bc 100644
--- a/vcl/ios/source/gdi/salcoretextstyle.cxx
+++ b/vcl/ios/source/gdi/salcoretextstyle.cxx
@@ -98,7 +98,7 @@ void CoreTextStyleInfo::SetColor(SalColor color)
msgs_debug(style, r:%d g:%d b:%d --, SALCOLOR_RED(color),
SALCOLOR_GREEN(color), SALCOLOR_BLUE(color));
SafeCFRelease(m_color);
CGColorSpaceRef rgb_space = CGColorSpaceCreateDeviceRGB();
-CGFloat c[] = { SALCOLOR_RED(color) / 255.0, SALCOLOR_GREEN(color) /
255.0, SALCOLOR_BLUE(color) / 255.0, 1.0 };
+CGFloat c[] = { SALCOLOR_RED(color) / 255.0f, SALCOLOR_GREEN(color) /
255.0f, SALCOLOR_BLUE(color) / 255.0f, 1.0 };
m_color = CGColorCreate(rgb_space, c);
CGColorSpaceRelease(rgb_space);
msgs_debug(style,color=%p --, m_color);
diff --git a/vcl/ios/source/gdi/salgdicommon.cxx
b/vcl/ios/source/gdi/salgdicommon.cxx
index 0b960da..615852c 100644
--- a/vcl/ios/source/gdi/salgdicommon.cxx
+++ b/vcl/ios/source/gdi/salgdicommon.cxx
@@ -314,7 +314,7 @@ void IosSalGraphics::copyBits( const SalTwoRect *pPosAry,
SalGraphics *pSrcGraph
DBG_ASSERT( pSrc-mxLayer!=NULL, IosSalGraphics::copyBits() from
non-layered graphics );
-const CGPoint aDstPoint = { +pPosAry-mnDestX - pPosAry-mnSrcX,
pPosAry-mnDestY - pPosAry-mnSrcY };
+const CGPoint aDstPoint = { static_castCGFloat(+pPosAry-mnDestX -
pPosAry-mnSrcX), static_castCGFloat(pPosAry-mnDestY - pPosAry-mnSrcY) };
if( (pPosAry-mnSrcWidth == pPosAry-mnDestWidth
pPosAry-mnSrcHeight == pPosAry-mnDestHeight)
(!mnBitmapDepth || (aDstPoint.x + pSrc-mnWidth) = mnWidth) ) //
workaround a Quartz crasher
@@ -330,7 +330,7 @@ void IosSalGraphics::copyBits( const SalTwoRect *pPosAry,
SalGraphics *pSrcGraph
}
}
CGContextSaveGState( xCopyContext );
-const CGRect aDstRect = { {pPosAry-mnDestX, pPosAry-mnDestY},
{pPosAry-mnDestWidth, pPosAry-mnDestHeight} };
+const CGRect aDstRect = { { static_castCGFloat(pPosAry-mnDestX),
static_castCGFloat(pPosAry-mnDestY) }, {
static_castCGFloat(pPosAry-mnDestWidth),
static_castCGFloat(pPosAry-mnDestHeight) } };
CGContextClipToRect( xCopyContext, aDstRect );
// draw at new destination
@@ -447,10 +447,10 @@ void IosSalGraphics::copyArea( long nDstX, long
nDstY,long nSrcX, long nSrcY,
CGLayerRef xSrcLayer = mxLayer;
// TODO: if( mnBitmapDepth 0 )
{
-const CGSize aSrcSize = { nSrcWidth, nSrcHeight };
+const CGSize aSrcSize = { static_castCGFloat(nSrcWidth),
static_castCGFloat(nSrcHeight) };
xSrcLayer = ::CGLayerCreateWithContext( xCopyContext, aSrcSize, NULL );
const CGContextRef xSrcContext = CGLayerGetContext( xSrcLayer );
-CGPoint aSrcPoint = { -nSrcX, -nSrcY };
+CGPoint aSrcPoint = { static_castCGFloat(-nSrcX),
static_castCGFloat(-nSrcY) };
if( IsFlipped() )
{
::CGContextTranslateCTM( xSrcContext, 0, +nSrcHeight );
@@ -461,7 +461,7 @@ void IosSalGraphics::copyArea( long nDstX, long nDstY,long
nSrcX, long nSrcY,
}
// draw at new destination
-const CGPoint aDstPoint = { +nDstX, +nDstY };
+const CGPoint aDstPoint = {