summaryrefslogtreecommitdiff
path: root/include/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-22 09:09:20 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-22 11:39:20 +0100
commit0526aa64c2eba08b218f3811866ab0cc507ac99b (patch)
treece8b8270981dc025972e3f20a2b05c3f44108788 /include/tools
parentbe48b0eb62d730c3534c6950613e99157806d897 (diff)
coverity#708207 Uninitialized scalar field
Change-Id: I8d74ddcf551e4a853dcf04a4ba1f33a46579ed06
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/bigint.hxx47
1 files changed, 25 insertions, 22 deletions
diff --git a/include/tools/bigint.hxx b/include/tools/bigint.hxx
index 387d663639f0..e90f91b5dce2 100644
--- a/include/tools/bigint.hxx
+++ b/include/tools/bigint.hxx
@@ -58,7 +58,14 @@ private:
TOOLS_DLLPRIVATE bool ABS_IsLess(BigInt const &) const;
public:
- BigInt();
+ BigInt()
+ : nVal(0)
+ , nLen(0)
+ , bIsNeg(false)
+ , bIsBig(false)
+ , bIsSet(false)
+ {
+ }
BigInt(short nValue)
: nVal(nValue)
@@ -86,14 +93,24 @@ public:
, bIsSet(true)
{
}
- BigInt( double nVal );
- BigInt( sal_uInt16 nVal );
- BigInt( sal_uInt32 nVal );
- BigInt( const BigInt& rBigInt );
- BigInt( const OUString& rString );
+
+ BigInt( double nVal );
+
+ BigInt(sal_uInt16 nValue)
+ : nVal(nValue)
+ , nLen(0)
+ , bIsNeg(false)
+ , bIsBig(false)
+ , bIsSet(true)
+ {
+ }
+
+ BigInt( sal_uInt32 nVal );
+ BigInt( const BigInt& rBigInt );
+ BigInt( const OUString& rString );
#ifdef _TLBIGINT_INT64
- BigInt( const SbxINT64 &r );
- BigInt( const SbxUINT64 &r );
+ BigInt( const SbxINT64 &r );
+ BigInt( const SbxUINT64 &r );
#endif
operator short() const;
@@ -144,20 +161,6 @@ public:
friend class Fraction;
};
-inline BigInt::BigInt()
-{
- bIsSet = false;
- bIsBig = false;
- nVal = 0;
-}
-
-inline BigInt::BigInt( sal_uInt16 nValue )
-{
- bIsSet = true;
- bIsBig = false;
- nVal = nValue;
-}
-
inline BigInt::operator short() const
{
if ( !bIsBig && nVal >= SHRT_MIN && nVal <= SHRT_MAX )