desktop/source/app/updater.cxx       |   14 ++++++++++----
 editeng/source/outliner/outlundo.cxx |    7 ++-----
 2 files changed, 12 insertions(+), 9 deletions(-)

New commits:
commit bcf1a726e875d36f7cf38c0e74a5287f46327fce
Author:     Julien Nabet <[email protected]>
AuthorDate: Sun Dec 1 12:55:35 2019 +0100
Commit:     Julien Nabet <[email protected]>
CommitDate: Sun Dec 1 19:21:51 2019 +0100

    cppcheck: performing init in init list (desktop/editeng)
    
    Change-Id: Ie489d36852b9c6be449c44f7fcc0cf1ee0164833
    Reviewed-on: https://gerrit.libreoffice.org/84144
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <[email protected]>

diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx
index adcc130751e7..ea9be47a8348 100644
--- a/desktop/source/app/updater.cxx
+++ b/desktop/source/app/updater.cxx
@@ -353,9 +353,12 @@ class invalid_hash : public std::exception
 public:
 
     invalid_hash(const OUString& rExpectedHash, const OUString& rReceivedHash)
+      : maMessage(
+          OUStringToOString(
+            OUString("Invalid hash found.\nExpected: " + rExpectedHash + 
";\nReceived: " + rReceivedHash),
+            RTL_TEXTENCODING_UTF8)
+         )
     {
-        OUString aMsg = "Invalid hash found.\nExpected: " + rExpectedHash + 
";\nReceived: " + rReceivedHash;
-        maMessage = OUStringToOString(aMsg, RTL_TEXTENCODING_UTF8);
     }
 
     const char* what() const noexcept override
@@ -370,9 +373,12 @@ class invalid_size : public std::exception
 public:
 
     invalid_size(const size_t nExpectedSize, const size_t nReceivedSize)
+      : maMessage(
+          OUStringToOString(
+            OUString("Invalid file size found.\nExpected: " + 
OUString::number(nExpectedSize) + ";\nReceived: " + 
OUString::number(nReceivedSize)),
+            RTL_TEXTENCODING_UTF8)
+         )
     {
-        OUString aMsg = "Invalid file size found.\nExpected: " + 
OUString::number(nExpectedSize) + ";\nReceived: " + 
OUString::number(nReceivedSize);
-        maMessage = OUStringToOString(aMsg, RTL_TEXTENCODING_UTF8);
     }
 
     const char* what() const noexcept override
diff --git a/editeng/source/outliner/outlundo.cxx 
b/editeng/source/outliner/outlundo.cxx
index 65f390f62487..76232c090dbf 100644
--- a/editeng/source/outliner/outlundo.cxx
+++ b/editeng/source/outliner/outlundo.cxx
@@ -68,10 +68,8 @@ void OutlinerUndoChangeParaFlags::ImplChangeFlags( ParaFlag 
nFlags )
 
OutlinerUndoChangeParaNumberingRestart::OutlinerUndoChangeParaNumberingRestart( 
Outliner* pOutliner, sal_Int32 nPara,
         sal_Int16 nOldNumberingStartValue, sal_Int16 nNewNumberingStartValue,
         bool  bOldParaIsNumberingRestart, bool bNewParaIsNumberingRestart )
-: OutlinerUndoBase( OLUNDO_DEPTH, pOutliner )
+: OutlinerUndoBase( OLUNDO_DEPTH, pOutliner ), mnPara(nPara)
 {
-    mnPara = nPara;
-
     maUndoData.mnNumberingStartValue = nOldNumberingStartValue;
     maUndoData.mbParaIsNumberingRestart = bOldParaIsNumberingRestart;
     maRedoData.mnNumberingStartValue = nNewNumberingStartValue;
@@ -111,9 +109,8 @@ void OutlinerUndoChangeDepth::Redo()
 }
 
 OutlinerUndoCheckPara::OutlinerUndoCheckPara( Outliner* pOutliner, sal_Int32 
nPara )
-    : OutlinerUndoBase( OLUNDO_DEPTH, pOutliner )
+    : OutlinerUndoBase( OLUNDO_DEPTH, pOutliner ), mnPara(nPara)
 {
-    mnPara = nPara;
 }
 
 void OutlinerUndoCheckPara::Undo()
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to