[Libreoffice-commits] core.git: vcl/source

Tor Lillqvist tml at collabora.com
Tue Sep 15 08:56:10 PDT 2015


 vcl/source/opengl/OpenGLHelper.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f74e120ed08fa557faf09a76363e774057163f76
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Sep 15 18:51:50 2015 +0300

    WaE: loplugin:cstylecast
    
    Change-Id: I08c31a7e097464da5df4fcda6637f442d147230f

diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index 4b7b21e..c4af1db 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -309,14 +309,14 @@ namespace
             GLint nBinaryLength = aBinary.size() - GLenumSize;
 
             // Extract binary format
-            sal_uInt8* pBF = (sal_uInt8*)(&nBinaryFormat);
+            sal_uInt8* pBF = reinterpret_cast<sal_uInt8*>(&nBinaryFormat);
             for( size_t i = 0; i < GLenumSize; ++i )
             {
                 pBF[i] = aBinary[nBinaryLength + i];
             }
 
             // Load the program
-            glProgramBinary( nProgramID, nBinaryFormat, (void*)(aBinary.data()), nBinaryLength );
+            glProgramBinary( nProgramID, nBinaryFormat, aBinary.data(), nBinaryLength );
 
             // Check the program
             glGetProgramiv(nProgramID, GL_LINK_STATUS, &nResult);
@@ -338,9 +338,9 @@ namespace
 
         std::vector<sal_uInt8> aBinary( nBinaryLength + GLenumSize );
 
-        glGetProgramBinary( nProgramID, nBinaryLength, NULL, &nBinaryFormat, (void*)(aBinary.data()) );
+        glGetProgramBinary( nProgramID, nBinaryLength, NULL, &nBinaryFormat, aBinary.data() );
 
-        const sal_uInt8* pBF = (const sal_uInt8*)(&nBinaryFormat);
+        const sal_uInt8* pBF = reinterpret_cast<const sal_uInt8*>(&nBinaryFormat);
         aBinary.insert( aBinary.end(), pBF, pBF + GLenumSize );
 
         SAL_INFO("vcl.opengl", "Program id: " << nProgramID );


More information about the Libreoffice-commits mailing list