summaryrefslogtreecommitdiff
path: root/include/tools/bigint.hxx
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-06-29 23:57:38 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-06-30 04:58:49 +0000
commit710f41b7aec8e7d35a0da8be332aa289f98942af (patch)
treeb894ef2d3f06a63a85f423b2713a654ea57f9c69 /include/tools/bigint.hxx
parent1ca3beae12a7f222c987481e07a544845fc9fd46 (diff)
Clean String and sal_Bool in tools
Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655 Reviewed-on: https://gerrit.libreoffice.org/4627 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'include/tools/bigint.hxx')
-rw-r--r--include/tools/bigint.hxx48
1 files changed, 24 insertions, 24 deletions
diff --git a/include/tools/bigint.hxx b/include/tools/bigint.hxx
index 0cf47ad4aaa0..95cd395ae912 100644
--- a/include/tools/bigint.hxx
+++ b/include/tools/bigint.hxx
@@ -49,13 +49,13 @@ private:
TOOLS_DLLPRIVATE void Normalize();
TOOLS_DLLPRIVATE void Mult(BigInt const &, sal_uInt16);
TOOLS_DLLPRIVATE void Div(sal_uInt16, sal_uInt16 &);
- TOOLS_DLLPRIVATE sal_Bool IsLess(BigInt const &) const;
+ TOOLS_DLLPRIVATE bool IsLess(BigInt const &) const;
TOOLS_DLLPRIVATE void AddLong(BigInt &, BigInt &);
TOOLS_DLLPRIVATE void SubLong(BigInt &, BigInt &);
TOOLS_DLLPRIVATE void MultLong(BigInt const &, BigInt &) const;
TOOLS_DLLPRIVATE void DivLong(BigInt const &, BigInt &) const;
TOOLS_DLLPRIVATE void ModLong(BigInt const &, BigInt &) const;
- TOOLS_DLLPRIVATE sal_Bool ABS_IsLess(BigInt const &) const;
+ TOOLS_DLLPRIVATE bool ABS_IsLess(BigInt const &) const;
public:
BigInt();
@@ -79,18 +79,18 @@ public:
operator sal_uInt16() const;
operator sal_uIntPtr() const;
- void Set( sal_Bool bSet ) { bIsSet = bSet; }
- OUString GetString() const;
+ void Set( bool bSet ) { bIsSet = bSet ? sal_True : sal_False; }
+ OUString GetString() const;
- sal_Bool IsSet() const { return bIsSet; }
- sal_Bool IsNeg() const;
- sal_Bool IsZero() const;
- sal_Bool IsOne() const;
- sal_Bool IsLong() const { return !bIsBig; }
+ bool IsSet() const { return (bool)bIsSet; }
+ bool IsNeg() const;
+ bool IsZero() const;
+ bool IsOne() const;
+ bool IsLong() const { return !((bool)bIsBig); }
void Abs();
#ifdef _TLBIGINT_INT64
- sal_Bool INT64 ( SbxINT64 *p ) const;
- sal_Bool UINT64( SbxUINT64 *p ) const;
+ bool INT64 ( SbxINT64 *p ) const;
+ bool UINT64( SbxUINT64 *p ) const;
#endif
BigInt& operator =( const BigInt& rVal );
@@ -111,12 +111,12 @@ public:
friend inline BigInt operator /( const BigInt& rVal1, const BigInt& rVal2 );
friend inline BigInt operator %( const BigInt& rVal1, const BigInt& rVal2 );
- TOOLS_DLLPUBLIC friend sal_Bool operator==( const BigInt& rVal1, const BigInt& rVal2 );
- friend inline sal_Bool operator!=( const BigInt& rVal1, const BigInt& rVal2 );
- TOOLS_DLLPUBLIC friend sal_Bool operator< ( const BigInt& rVal1, const BigInt& rVal2 );
- TOOLS_DLLPUBLIC friend sal_Bool operator> ( const BigInt& rVal1, const BigInt& rVal2 );
- friend inline sal_Bool operator<=( const BigInt& rVal1, const BigInt& rVal2 );
- friend inline sal_Bool operator>=( const BigInt& rVal1, const BigInt& rVal2 );
+ TOOLS_DLLPUBLIC friend bool operator==( const BigInt& rVal1, const BigInt& rVal2 );
+ friend inline bool operator!=( const BigInt& rVal1, const BigInt& rVal2 );
+ TOOLS_DLLPUBLIC friend bool operator< ( const BigInt& rVal1, const BigInt& rVal2 );
+ TOOLS_DLLPUBLIC friend bool operator> ( const BigInt& rVal1, const BigInt& rVal2 );
+ friend inline bool operator<=( const BigInt& rVal1, const BigInt& rVal2 );
+ friend inline bool operator>=( const BigInt& rVal1, const BigInt& rVal2 );
friend class Fraction;
};
@@ -224,15 +224,15 @@ inline BigInt& BigInt::operator =( const sal_uInt16 nValue )
return *this;
}
-inline sal_Bool BigInt::IsNeg() const
+inline bool BigInt::IsNeg() const
{
if ( !bIsBig )
return (nVal < 0);
else
- return (sal_Bool)bIsNeg;
+ return (bool)bIsNeg;
}
-inline sal_Bool BigInt::IsZero() const
+inline bool BigInt::IsZero() const
{
if ( bIsBig )
return sal_False;
@@ -240,7 +240,7 @@ inline sal_Bool BigInt::IsZero() const
return (nVal == 0);
}
-inline sal_Bool BigInt::IsOne() const
+inline bool BigInt::IsOne() const
{
if ( bIsBig )
return sal_False;
@@ -291,17 +291,17 @@ inline BigInt operator%( const BigInt &rVal1, const BigInt &rVal2 )
return aErg;
}
-inline sal_Bool operator!=( const BigInt& rVal1, const BigInt& rVal2 )
+inline bool operator!=( const BigInt& rVal1, const BigInt& rVal2 )
{
return !(rVal1 == rVal2);
}
-inline sal_Bool operator<=( const BigInt& rVal1, const BigInt& rVal2 )
+inline bool operator<=( const BigInt& rVal1, const BigInt& rVal2 )
{
return !( rVal1 > rVal2);
}
-inline sal_Bool operator>=( const BigInt& rVal1, const BigInt& rVal2 )
+inline bool operator>=( const BigInt& rVal1, const BigInt& rVal2 )
{
return !(rVal1 < rVal2);
}