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 | |
parent | f6cfe99d22041061b8042cdab05e57180c0ab70a (diff) |
Some more loplugin:cstylecast: vcl
Change-Id: I74d35630b9fcdaa97af0b1f1e6d1e5c72488964d
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/opengl/OpenGLContext.hxx | 8 | ||||
-rw-r--r-- | include/vcl/salbtype.hxx | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 5ef30cd4bf06..18fc710a2f73 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -77,18 +77,18 @@ struct GLWindow return GL_FALSE; } - deleteThis=lookHere=(char*)malloc(strlen((const char*)extString)+1); + deleteThis=lookHere=(char*)malloc(strlen(reinterpret_cast<const char*>(extString))+1); if (lookHere==NULL) { return GL_FALSE; } /* strtok() will modify string, so copy it somewhere */ - strcpy(lookHere,(const char*)extString); + strcpy(lookHere, reinterpret_cast<const char*>(extString)); while ((word=strtok(lookHere, " "))!=NULL) { - if (strcmp(word,(const char*)extName)==0) + if (strcmp(word, reinterpret_cast<const char*>(extName))==0) { flag=GL_TRUE; break; @@ -119,7 +119,7 @@ struct GLWindow GLXContext ctx; GLXPixmap glPix; - bool HasGLXExtension( const char* name ) { return checkExtension( (const GLubyte*) name, (const GLubyte*) GLXExtensions ); } + bool HasGLXExtension( const char* name ) { return checkExtension( reinterpret_cast<const GLubyte*>(name), reinterpret_cast<const GLubyte*>(GLXExtensions) ); } const char* GLXExtensions; #endif unsigned int bpp; 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; } } |