diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-19 15:10:10 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-20 09:06:54 +0100 |
commit | fe9d002ef55e30aa3629f4e1951beb18ebb692b0 (patch) | |
tree | 1c72b3d97c34801d23ab1d9509aa56081e4d401f /include/vcl/salbtype.hxx | |
parent | f6cfe99d22041061b8042cdab05e57180c0ab70a (diff) |
Some more loplugin:cstylecast: vcl
Change-Id: I74d35630b9fcdaa97af0b1f1e6d1e5c72488964d
Diffstat (limited to 'include/vcl/salbtype.hxx')
-rw-r--r-- | include/vcl/salbtype.hxx | 16 |
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; } } |