[Libreoffice-commits] core.git: 3 commits - basctl/source cui/source l10ntools/source vcl/source

Caolán McNamara caolanm at redhat.com
Mon Apr 4 09:41:36 UTC 2016


 basctl/source/basicide/moduldl2.cxx |    6 ++++--
 cui/source/customize/acccfg.cxx     |    2 +-
 l10ntools/source/gLang.cxx          |   16 ++++++++--------
 vcl/source/gdi/bitmap4.cxx          |    2 +-
 4 files changed, 14 insertions(+), 12 deletions(-)

New commits:
commit 03d3506286eca8140e17b8473b9f33fa02da4f0c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 4 10:40:24 2016 +0100

    cppcheck: noExplicitConstructor
    
    Change-Id: I9510a16bf4ac5dd2c3da16c618841918daea8cfb

diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index cd70080..3ca7477 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -111,8 +111,10 @@ public:
 class LibLBoxString : public SvLBoxString
 {
 public:
-    LibLBoxString( const OUString& rTxt ) :
-        SvLBoxString( rTxt ) {}
+    explicit LibLBoxString(const OUString& rTxt)
+        : SvLBoxString(rTxt)
+    {
+    }
 
     virtual void Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
                        const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override;
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index c32a4d3..a885da1 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -634,7 +634,7 @@ static long AccCfgTabs[] =
 class SfxAccCfgLBoxString_Impl : public SvLBoxString
 {
 public:
-    SfxAccCfgLBoxString_Impl(const OUString& sText);
+    explicit SfxAccCfgLBoxString_Impl(const OUString& sText);
 
     virtual ~SfxAccCfgLBoxString_Impl();
 
commit 9fb09a9cb3752496c8cde0ae399f83261848c441
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 4 10:23:16 2016 +0100

    cppcheck: catchExceptionByValue
    
    Change-Id: Icd52f56b7686a6901793e6c8fce1ffbb3b92af13

diff --git a/l10ntools/source/gLang.cxx b/l10ntools/source/gLang.cxx
index ae45779..fff5928 100644
--- a/l10ntools/source/gLang.cxx
+++ b/l10ntools/source/gLang.cxx
@@ -392,13 +392,13 @@ int main(int argc, char *argv[])
     try {
         cHandler.checkCommandLine(argc, argv);
     }
-    catch(const char *sErr) {
-        string myErr(sErr);
+    catch(const char *pErr) {
+        string myErr(pErr);
         cHandler.showUsage(myErr);
         exit(-1);
     }
-    catch(string sErr) {
-        cHandler.showUsage(sErr);
+    catch(const string& rErr) {
+        cHandler.showUsage(rErr);
         exit(-1);
     }
 
@@ -406,13 +406,13 @@ int main(int argc, char *argv[])
     try {
         cHandler.run();
     }
-    catch(const char *sErr) {
-        string myErr(sErr);
+    catch(const char *pErr) {
+        string myErr(pErr);
         cHandler.showRunTimeError(myErr);
         exit(-1);
     }
-    catch(string sErr) {
-        cHandler.showRunTimeError(sErr);
+    catch(const string& rErr) {
+        cHandler.showRunTimeError(rErr);
         exit(-1);
     }
 }
commit 43c23b624ebf467c3955b54a914905b3bfd1a8e3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 4 10:21:02 2016 +0100

    cppcheck: truncLongCastAssignment
    
    Change-Id: I2d7c2c41f9ad5eb1e30e2bb4cbfb101deab1c907

diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index b1e3ca8..cc7b7da 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -585,7 +585,7 @@ bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam )
                 const long  nLx = FRound( cos( fAzim ) * cos( fElev ) * 255.0 );
                 const long  nLy = FRound( sin( fAzim ) * cos( fElev ) * 255.0 );
                 const long  nLz = FRound( sin( fElev ) * 255.0 );
-                const long  nZ2 = ( ( 6 * 255 ) / 4 ) * ( ( 6 * 255 ) / 4 );
+                const auto  nZ2 = ( ( 6 * 255 ) / 4 ) * ( ( 6 * 255 ) / 4 );
                 const long  nNzLz = ( ( 6 * 255 ) / 4 ) * nLz;
                 const sal_uInt8 cLz = (sal_uInt8) SAL_BOUND( nLz, 0, 255 );
 


More information about the Libreoffice-commits mailing list