rsc/source/parser/rscdb.cxx |   23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

New commits:
commit 2a1431208e4292e8563935f5e8cd0107113f65ea
Author: Jochen Nitschke <j.nitschke+loger...@ok.de>
Date:   Wed Aug 31 11:39:59 2016 +0200

    cppcheck:noConstructor for RscEnumerateObj
    
    use initializer lists for ctors
    
    Change-Id: I1ac13d4178d070e02223cb70d8dc80d229a5fa7b
    Reviewed-on: https://gerrit.libreoffice.org/28543
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Jochen Nitschke <j.nitschke+loger...@ok.de>

diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index 53855fc..05638fb 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -42,6 +42,8 @@ RscTypCont::RscTypCont( RscError * pErrHdl,
     : nSourceCharSet( RTL_TEXTENCODING_UTF8 )
     , nByteOrder( nOrder )
     , aSearchPath( rSearchPath )
+    , nUniqueId(256)
+    , nPMId(RSC_VERSIONCONTROL +1) // at least one more
     , aBool( pHS->getID( "sal_Bool" ), RSC_NOTYPE )
     , aShort( pHS->getID( "short" ), RSC_NOTYPE )
     , aUShort( pHS->getID( "sal_uInt16" ), RSC_NOTYPE )
@@ -57,11 +59,9 @@ RscTypCont::RscTypCont( RscError * pErrHdl,
     , aLangType()
     , aLangString( pHS->getID( "Lang_Chars" ), RSC_NOTYPE, &aString, 
&aLangType )
     , aLangShort( pHS->getID( "Lang_short" ), RSC_NOTYPE, &aShort, &aLangType )
+    , pEH(pErrHdl)
     , nFlags( nFlagsP )
 {
-    nUniqueId = 256;
-    nPMId = RSC_VERSIONCONTROL +1; // at least one more
-    pEH = pErrHdl;
     Init();
 }
 
@@ -290,6 +290,14 @@ private:
     sal_uLong   lFileKey;   // what source file
     RscTop *    pClass;
 
+    RscEnumerateObj(RscTypCont* pTC, FILE* pOutputFile)
+        :pTypCont(pTC)
+        ,fOutput(pOutputFile)
+        ,lFileKey(0)
+        ,pClass(nullptr)
+    {
+    }
+
     DECL_LINK_TYPED( CallBackWriteRc, const NameNode&, void );
     DECL_LINK_TYPED( CallBackWriteSrc, const NameNode&, void );
 
@@ -388,12 +396,9 @@ private:
 public:
     RscEnumerateObj aEnumObj;
 
-    RscEnumerateRef( RscTypCont * pTC, RscTop * pR,
-                     FILE * fOutput )
+    RscEnumerateRef(RscTypCont* pTC, RscTop* pR, FILE* fOutput)
+        : pRoot(pR), aEnumObj(pTC, fOutput)
         {
-            aEnumObj.pTypCont = pTC;
-            aEnumObj.fOutput  = fOutput;
-            pRoot             = pR;
         }
     ERRTYPE const & WriteRc()
         {
@@ -475,8 +480,8 @@ public:
 
 
 inline RscDel::RscDel( RscTop * pRoot, sal_uLong lKey )
+    : lFileKey(lKey)
 {
-    lFileKey = lKey;
     pRoot->EnumNodes( LINK( this, RscDel, Delete ) );
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to