diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-17 10:15:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-17 14:31:01 +0100 |
commit | 9536098ff107f1096e7f710c6f1e76c5659a5482 (patch) | |
tree | 4cd6aded807048286a671191270f61598dd53d99 /tools/source | |
parent | deee29710f4c7c43ca86cb3183fb208217051fa7 (diff) |
simplify BigInt, remove isSet
no need for such a thing to be "nullable", just default it to zero,
as one would be expect for such a type.
Change-Id: Ic8b78ca3288355c90820135b9ced2c865ff7606e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105970
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/generic/bigint.cxx | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx index d90ac2447fa1..62350a30c311 100644 --- a/tools/source/generic/bigint.cxx +++ b/tools/source/generic/bigint.cxx @@ -477,7 +477,6 @@ BigInt::BigInt( const BigInt& rBigInt ) memcpy( static_cast<void*>(this), static_cast<const void*>(&rBigInt), sizeof( BigInt ) ); else { - bIsSet = rBigInt.bIsSet; bIsBig = false; nVal = rBigInt.nVal; } @@ -486,7 +485,6 @@ BigInt::BigInt( const BigInt& rBigInt ) BigInt::BigInt( const OUString& rString ) : nLen(0) { - bIsSet = true; bIsNeg = false; bIsBig = false; nVal = 0; @@ -513,8 +511,6 @@ BigInt::BigInt( const OUString& rString ) BigInt::BigInt( double nValue ) : nVal(0) { - bIsSet = true; - if ( nValue < 0 ) { nValue *= -1; @@ -557,7 +553,6 @@ BigInt::BigInt( double nValue ) BigInt::BigInt( sal_uInt32 nValue ) : nVal(0) { - bIsSet = true; if ( nValue & 0x80000000U ) { bIsBig = true; @@ -578,7 +573,6 @@ BigInt::BigInt( sal_uInt32 nValue ) BigInt::BigInt( sal_Int64 nValue ) : nVal(0) { - bIsSet = true; bIsNeg = nValue < 0; nLen = 0; @@ -632,7 +626,6 @@ BigInt& BigInt::operator=( const BigInt& rBigInt ) memcpy( static_cast<void*>(this), static_cast<const void*>(&rBigInt), sizeof( BigInt ) ); else { - bIsSet = rBigInt.bIsSet; bIsBig = false; nVal = rBigInt.nVal; } |