Some more loplugin:cstylecast: canvas

Change-Id: I3654875c560ba4c2d88b023e3b2104c6f43bb4a0
This commit is contained in:
Stephan Bergmann
2015-01-17 18:14:57 +01:00
parent 93afb9ad7f
commit c7cc1a9132
2 changed files with 2 additions and 2 deletions

View File

@@ -183,7 +183,7 @@ namespace cairocanvas
unsigned int nStride = cairo_image_surface_get_stride( pPixels ); unsigned int nStride = cairo_image_surface_get_stride( pPixels );
for( unsigned long y = 0; y < (unsigned long) aSize.Height(); y++ ) for( unsigned long y = 0; y < (unsigned long) aSize.Height(); y++ )
{ {
sal_uInt32 *pPix = (sal_uInt32 *)(pSrc + nStride * y); sal_uInt32 *pPix = reinterpret_cast<sal_uInt32 *>(pSrc + nStride * y);
for( unsigned long x = 0; x < (unsigned long) aSize.Width(); x++ ) for( unsigned long x = 0; x < (unsigned long) aSize.Width(); x++ )
{ {
sal_uInt8 nAlpha = (*pPix >> 24); sal_uInt8 nAlpha = (*pPix >> 24);

View File

@@ -1574,7 +1574,7 @@ namespace cairocanvas
const Format eFormat( mbHaveAlpha ? CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24 ); const Format eFormat( mbHaveAlpha ? CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24 );
uno::Sequence< sal_Int8 > aRes( 4*nWidth*nHeight ); uno::Sequence< sal_Int8 > aRes( 4*nWidth*nHeight );
sal_Int8* pData = aRes.getArray(); sal_Int8* pData = aRes.getArray();
cairo_surface_t* pImageSurface = cairo_image_surface_create_for_data( (unsigned char *) pData, cairo_surface_t* pImageSurface = cairo_image_surface_create_for_data( reinterpret_cast<unsigned char *>(pData),
eFormat, eFormat,
nWidth, nHeight, 4*nWidth ); nWidth, nHeight, 4*nWidth );
cairo_t* pCairo = cairo_create( pImageSurface ); cairo_t* pCairo = cairo_create( pImageSurface );