summaryrefslogtreecommitdiff
path: root/include/vcl/salbtype.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-19 15:10:10 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-20 09:06:54 +0100
commitfe9d002ef55e30aa3629f4e1951beb18ebb692b0 (patch)
tree1c72b3d97c34801d23ab1d9509aa56081e4d401f /include/vcl/salbtype.hxx
parentf6cfe99d22041061b8042cdab05e57180c0ab70a (diff)
Some more loplugin:cstylecast: vcl
Change-Id: I74d35630b9fcdaa97af0b1f1e6d1e5c72488964d
Diffstat (limited to 'include/vcl/salbtype.hxx')
-rw-r--r--include/vcl/salbtype.hxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx
index 970d3194e104..40dfd8f8ba17 100644
--- a/include/vcl/salbtype.hxx
+++ b/include/vcl/salbtype.hxx
@@ -471,7 +471,7 @@ inline BitmapPalette::BitmapPalette( const BitmapPalette& rBitmapPalette ) :
if( mnCount )
{
const sal_uLong nSize = mnCount * sizeof( BitmapColor );
- mpBitmapColor = (BitmapColor*) new sal_uInt8[ nSize ];
+ mpBitmapColor = reinterpret_cast<BitmapColor*>(new sal_uInt8[ nSize ]);
memcpy( mpBitmapColor, rBitmapPalette.mpBitmapColor, nSize );
}
else
@@ -484,7 +484,7 @@ inline BitmapPalette::BitmapPalette( sal_uInt16 nCount ) :
if( mnCount )
{
const sal_uLong nSize = mnCount * sizeof( BitmapColor );
- mpBitmapColor = (BitmapColor*) new sal_uInt8[ nSize ];
+ mpBitmapColor = reinterpret_cast<BitmapColor*>(new sal_uInt8[ nSize ]);
memset( mpBitmapColor, 0, nSize );
}
else
@@ -493,18 +493,18 @@ inline BitmapPalette::BitmapPalette( sal_uInt16 nCount ) :
inline BitmapPalette::~BitmapPalette()
{
- delete[] (sal_uInt8*) mpBitmapColor;
+ delete[] reinterpret_cast<sal_uInt8*>(mpBitmapColor);
}
inline BitmapPalette& BitmapPalette::operator=( const BitmapPalette& rBitmapPalette )
{
- delete[] (sal_uInt8*) mpBitmapColor;
+ delete[] reinterpret_cast<sal_uInt8*>(mpBitmapColor);
mnCount = rBitmapPalette.mnCount;
if( mnCount )
{
const sal_uLong nSize = mnCount * sizeof( BitmapColor );
- mpBitmapColor = (BitmapColor*) new sal_uInt8[ nSize ];
+ mpBitmapColor = reinterpret_cast<BitmapColor*>(new sal_uInt8[ nSize ]);
memcpy( mpBitmapColor, rBitmapPalette.mpBitmapColor, nSize );
}
else
@@ -553,7 +553,7 @@ inline void BitmapPalette::SetEntryCount( sal_uInt16 nCount )
{
if( !nCount )
{
- delete[] (sal_uInt8*) mpBitmapColor;
+ delete[] reinterpret_cast<sal_uInt8*>(mpBitmapColor);
mpBitmapColor = NULL;
mnCount = 0;
}
@@ -565,9 +565,9 @@ inline void BitmapPalette::SetEntryCount( sal_uInt16 nCount )
if ( nMinSize && mpBitmapColor )
memcpy( pNewColor, mpBitmapColor, nMinSize );
- delete[] (sal_uInt8*) mpBitmapColor;
+ delete[] reinterpret_cast<sal_uInt8*>(mpBitmapColor);
memset( pNewColor + nMinSize, 0, nNewSize - nMinSize );
- mpBitmapColor = (BitmapColor*) pNewColor;
+ mpBitmapColor = reinterpret_cast<BitmapColor*>(pNewColor);
mnCount = nCount;
}
}