summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-07-19 15:26:15 +0200
committerThomas Arnhold <thomas@arnhold.org>2011-07-20 16:38:54 +0200
commitd8a09482fb417d60fa3ff79070ef9e701b44d3ad (patch)
treeb1aac205ec35555116913e742aac6f7909f1abd6 /tools
parentc2f4124291d1da026c97a560babf0a0dde5c76b6 (diff)
callcatcher: remove unused BigInt::DivMod
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/bigint.hxx1
-rw-r--r--tools/source/generic/bigint.cxx69
2 files changed, 0 insertions, 70 deletions
diff --git a/tools/inc/tools/bigint.hxx b/tools/inc/tools/bigint.hxx
index 58810fffdd99..1b1d60bdb6e3 100644
--- a/tools/inc/tools/bigint.hxx
+++ b/tools/inc/tools/bigint.hxx
@@ -105,7 +105,6 @@ public:
sal_Bool IsOne() const;
sal_Bool IsLong() const { return !bIsBig; }
void Abs();
- void DivMod( const BigInt &rDivisor, BigInt &rMod );
#ifdef _TLBIGINT_INT64
sal_Bool INT64 ( SbxINT64 *p ) const;
sal_Bool UINT64( SbxUINT64 *p ) const;
diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx
index 4392e56d5e44..2312f3c5eeaf 100644
--- a/tools/source/generic/bigint.cxx
+++ b/tools/source/generic/bigint.cxx
@@ -855,75 +855,6 @@ BigInt& BigInt::operator/=( const BigInt& rVal )
// -----------------------------------------------------------------------
-void BigInt::DivMod( const BigInt& rVal, BigInt& rMod )
-{
- if ( !rVal.bIsBig )
- {
- if ( rVal.nVal == 0 )
- {
- OSL_FAIL( "BigInt::operator/ --> divide by zero" );
- return;
- }
-
- if ( !bIsBig )
- {
- // wir bewegen uns im ungefaehrlichem Bereich
- rMod = BigInt( nVal % rVal.nVal );
- nVal /= rVal.nVal;
- return;
- }
-
- if ( rVal.nVal == 1 )
- {
- rMod = BigInt( (long)0 );
- return;
- }
-
- if ( rVal.nVal == -1 )
- {
- rMod = BigInt( (long)0 );
- bIsNeg = !bIsNeg;
- return;
- }
-
- if ( rVal.nVal <= (long)0xFFFF && rVal.nVal >= -(long)0xFFFF )
- {
- // ein BigInt durch ein sal_uInt16 teilen
- sal_uInt16 nTmp;
- if ( rVal.nVal < 0 )
- {
- nTmp = (sal_uInt16) -rVal.nVal;
- bIsNeg = !bIsNeg;
- }
- else
- nTmp = (sal_uInt16) rVal.nVal;
-
- Div( nTmp, nTmp );
- rMod = BigInt( (long)nTmp );
- Normalize();
- return;
- }
- }
-
- if ( ABS_IsLess( rVal ) )
- {
- rMod = *this;
- *this = BigInt( (long)0 );
- return;
- }
-
- // BigInt durch BigInt teilen
- BigInt aTmp1, aTmp2;
- aTmp1.MakeBigInt( *this );
- aTmp2.MakeBigInt( rVal );
- aTmp1.DivLong(aTmp2, *this);
- Normalize();
- aTmp1.ModLong(aTmp2, rMod); // nicht optimal
- rMod.Normalize();
-}
-
-// -----------------------------------------------------------------------
-
BigInt& BigInt::operator%=( const BigInt& rVal )
{
if ( !rVal.bIsBig )