summaryrefslogtreecommitdiff
path: root/include/tools/bigint.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-07 14:58:04 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-07 17:45:26 +0100
commit8d52646747cc70a6c01174cb1a168ece4c95ac68 (patch)
treea4212b30f99d4e89da53c8546bbeae0a527a1363 /include/tools/bigint.hxx
parent150267f9d1b17b1f4e1443e92dc5247632755e5f (diff)
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@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/tools/bigint.hxx')
-rw-r--r--include/tools/bigint.hxx8
1 files changed, 4 insertions, 4 deletions
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;
}