[Libreoffice-commits] core.git: include/tools

Caolán McNamara caolanm at redhat.com
Sun Jan 7 16:45:54 UTC 2018


 include/tools/bigint.hxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 8d52646747cc70a6c01174cb1a168ece4c95ac68
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Jan 7 14:58:04 2018 +0000

    coverity#1427248 Operands don't affect result
    
    and
    
    coverity#1427249 Operands don't affect result
    
    Change-Id: Ibda556045d7d2cffb92e01a93c0bc5bade1e78a6
    Reviewed-on: https://gerrit.libreoffice.org/47533
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/tools/bigint.hxx b/include/tools/bigint.hxx
index b8079a2ccd28..8692bd2e7787 100644
--- a/include/tools/bigint.hxx
+++ b/include/tools/bigint.hxx
@@ -147,8 +147,8 @@ inline BigInt::operator sal_uInt16() const
 
 inline BigInt::operator sal_Int32() const
 {
-    if ( !bIsBig && nVal >= SAL_MIN_INT32 && nVal <= SAL_MAX_INT32 )
-        return (sal_Int32)nVal;
+    if (!bIsBig)
+        return nVal;
     assert(false && "out of range");
     return 0;
 }
@@ -165,8 +165,8 @@ inline BigInt::operator sal_uInt32() const
 inline BigInt::operator long() const
 {
     // Clamp to int32 since long is int32 on Windows.
-    if ( !bIsBig && nVal >= SAL_MIN_INT32 && nVal <= SAL_MAX_INT32 )
-        return (long)nVal;
+    if (!bIsBig)
+        return nVal;
     assert(false && "out of range");
     return 0;
 }


More information about the Libreoffice-commits mailing list