Kaydet (Commit) 8d526467 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1427248 Operands don't affect result

and

coverity#1427249 Operands don't affect result

Change-Id: Ibda556045d7d2cffb92e01a93c0bc5bade1e78a6
Reviewed-on: https://gerrit.libreoffice.org/47533Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 150267f9
...@@ -147,8 +147,8 @@ inline BigInt::operator sal_uInt16() const ...@@ -147,8 +147,8 @@ inline BigInt::operator sal_uInt16() const
inline BigInt::operator sal_Int32() const inline BigInt::operator sal_Int32() const
{ {
if ( !bIsBig && nVal >= SAL_MIN_INT32 && nVal <= SAL_MAX_INT32 ) if (!bIsBig)
return (sal_Int32)nVal; return nVal;
assert(false && "out of range"); assert(false && "out of range");
return 0; return 0;
} }
...@@ -165,8 +165,8 @@ inline BigInt::operator sal_uInt32() const ...@@ -165,8 +165,8 @@ inline BigInt::operator sal_uInt32() const
inline BigInt::operator long() const inline BigInt::operator long() const
{ {
// Clamp to int32 since long is int32 on Windows. // Clamp to int32 since long is int32 on Windows.
if ( !bIsBig && nVal >= SAL_MIN_INT32 && nVal <= SAL_MAX_INT32 ) if (!bIsBig)
return (long)nVal; return nVal;
assert(false && "out of range"); assert(false && "out of range");
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment