summaryrefslogtreecommitdiff
path: root/include/tools/bigint.hxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2020-11-12 12:23:41 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2020-11-12 19:14:41 +0100
commit8927bea9fafae63898f1d6099af7c305c063a067 (patch)
tree5c01fdf8b3f9e9be714af20b1df6ba025676fa29 /include/tools/bigint.hxx
parent4a7e972ea2ddad4987934fb181fcc1b7e3d125f8 (diff)
Simplify comparison operators
Change-Id: I9f1b386ddb4d7d5377151c54baee207b2444c7d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105541 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/tools/bigint.hxx')
-rw-r--r--include/tools/bigint.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/tools/bigint.hxx b/include/tools/bigint.hxx
index a07ba53d7f92..6683f07e3121 100644
--- a/include/tools/bigint.hxx
+++ b/include/tools/bigint.hxx
@@ -114,7 +114,7 @@ public:
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 inline bool operator>=( const BigInt& rVal1, const BigInt& rVal2 );
@@ -226,6 +226,8 @@ inline bool operator!=( const BigInt& rVal1, const BigInt& rVal2 )
return !(rVal1 == rVal2);
}
+inline bool operator>(const BigInt& rVal1, const BigInt& rVal2) { return rVal2 < rVal1; }
+
inline bool operator<=( const BigInt& rVal1, const BigInt& rVal2 )
{
return !( rVal1 > rVal2);