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

Stephan Bergmann sbergman at redhat.com
Tue Jan 20 02:32:11 PST 2015


 xmlhelp/source/cxxhelp/provider/db.cxx           |    6 +++---
 xmlhelp/source/cxxhelp/provider/urlparameter.cxx |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 473c20d86ea0cdd1307bfd5c89f89c3ba2c316a1
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 20 11:31:42 2015 +0100

    Some more loplugin:cstylecast: xmlhelp
    
    Change-Id: I1aa45f669711a90cce52bafd839bd84eb711436a

diff --git a/xmlhelp/source/cxxhelp/provider/db.cxx b/xmlhelp/source/cxxhelp/provider/db.cxx
index c8cbbe7..8a834d0 100644
--- a/xmlhelp/source/cxxhelp/provider/db.cxx
+++ b/xmlhelp/source/cxxhelp/provider/db.cxx
@@ -85,7 +85,7 @@ void Hdf::createHashMap( bool bOptimizeForPerformance )
         sal_Int32 nSize = m_xSFA->getSize( m_aFileURL );
         sal_Int32 nRead = xIn->readBytes( aData, nSize );
 
-        const char* pData = (const char*)aData.getConstArray();
+        const char* pData = reinterpret_cast<const char*>(aData.getConstArray());
         int iPos = 0;
         while( iPos < nRead )
         {
@@ -173,7 +173,7 @@ bool Hdf::getValueForKey( const OString& rKey, HDFData& rValue )
                     sal_Int32 nRead = xIn->readBytes( aData, nValueLen );
                     if( nRead == nValueLen )
                     {
-                        const char* pData = (const sal_Char*)aData.getConstArray();
+                        const char* pData = reinterpret_cast<const sal_Char*>(aData.getConstArray());
                         rValue.copyToBuffer( pData, nValueLen );
                         bSuccess = true;
                     }
@@ -218,7 +218,7 @@ bool Hdf::startIteration( void )
         if( m_nItRead == nSize )
         {
             bSuccess = true;
-            m_pItData = (const char*)m_aItData.getConstArray();
+            m_pItData = reinterpret_cast<const char*>(m_aItData.getConstArray());
             m_iItPos = 0;
         }
         else
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 08cdee8..6deea99 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -370,7 +370,7 @@ public:
 
     void addToBuffer( const char* buffer,int len );
 
-    sal_Int8* getData() const { return (sal_Int8*) buffer; }
+    sal_Int8 const * getData() const { return reinterpret_cast<sal_Int8 const *>(buffer); }
 
     sal_Int32 getLen() const { return sal_Int32( len ); }
 
@@ -986,7 +986,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
         xmlRegisterInputCallbacks(fileMatch, fileOpen, fileRead, fileClose);
 
         xsltStylesheetPtr cur =
-            xsltParseStylesheetFile((const xmlChar *)xslURLascii.getStr());
+            xsltParseStylesheetFile(reinterpret_cast<const xmlChar *>(xslURLascii.getStr()));
 
         xmlDocPtr doc = xmlParseFile("vnd.sun.star.zip:/");
 
@@ -996,7 +996,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
             xmlChar *doc_txt_ptr=0;
             int doc_txt_len;
             xsltSaveResultToString(&doc_txt_ptr, &doc_txt_len, res, cur);
-            addToBuffer((const char*)doc_txt_ptr, doc_txt_len);
+            addToBuffer(reinterpret_cast<char*>(doc_txt_ptr), doc_txt_len);
             xmlFree(doc_txt_ptr);
         }
         xmlPopInputCallbacks(); //filePatch


More information about the Libreoffice-commits mailing list