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

Stephan Bergmann sbergman at redhat.com
Fri Jun 29 15:25:10 UTC 2018


 basic/source/sbx/sbxbyte.cxx |    2 +-
 basic/source/sbx/sbxint.cxx  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 742e38eae70eeb4e5f9c38305314e302f5bac979
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jun 29 15:51:05 2018 +0200

    Improved loplugin:redundantcast (const-qualified typedefs): basic
    
    Change-Id: Ie22fe58dc2c2cc3867bd800f757433b68e0f2448
    Reviewed-on: https://gerrit.libreoffice.org/56693
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/basic/source/sbx/sbxbyte.cxx b/basic/source/sbx/sbxbyte.cxx
index e125dd023ffc..df85f5f7f1e0 100644
--- a/basic/source/sbx/sbxbyte.cxx
+++ b/basic/source/sbx/sbxbyte.cxx
@@ -45,7 +45,7 @@ start:
                 nRes = static_cast<sal_uInt8>(p->nChar);
             break;
         case SbxBYTE:
-            nRes = static_cast<sal_uInt8>(p->nByte);    break;
+            nRes = p->nByte;    break;
         case SbxINTEGER:
         case SbxBOOL:
             if( p->nInteger > SbxMAXBYTE )
diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx
index 3109f424164c..7f16ef7e0013 100644
--- a/basic/source/sbx/sbxint.cxx
+++ b/basic/source/sbx/sbxint.cxx
@@ -86,7 +86,7 @@ start:
             break;
         case SbxCURRENCY:
             {
-                sal_Int64 tstVal = static_cast<sal_Int64>(p->nInt64) / sal_Int64(CURRENCY_FACTOR);
+                sal_Int64 tstVal = p->nInt64 / sal_Int64(CURRENCY_FACTOR);
 
                 if( tstVal > SbxMAXINT )
                 {


More information about the Libreoffice-commits mailing list