summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/number.cpp6
-rw-r--r--src/number.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/number.cpp b/src/number.cpp
index d95ab90..062e368 100644
--- a/src/number.cpp
+++ b/src/number.cpp
@@ -121,6 +121,12 @@ Number Number::operator-() const
121 return neg; 121 return neg;
122} 122}
123 123
124bool Number::operator==( const Bu::String &rhs ) const
125{
126 Number nrhs( rhs, iScale, iRadix );
127 return (*this) == nrhs;
128}
129
124bool Number::operator==( const Number &rhs ) const 130bool Number::operator==( const Number &rhs ) const
125{ 131{
126 if( rhs.bPositive != bPositive || 132 if( rhs.bPositive != bPositive ||
diff --git a/src/number.h b/src/number.h
index 0816a17..8077fe0 100644
--- a/src/number.h
+++ b/src/number.h
@@ -21,6 +21,7 @@ public:
21 Number operator%( const Number &rhs ) const; 21 Number operator%( const Number &rhs ) const;
22 Number operator-() const; 22 Number operator-() const;
23 23
24 bool operator==( const Bu::String &rhs ) const;
24 bool operator==( const Number &rhs ) const; 25 bool operator==( const Number &rhs ) const;
25 bool operator!=( const Number &rhs ) const; 26 bool operator!=( const Number &rhs ) const;
26 bool operator>( const Number &rhs ) const; 27 bool operator>( const Number &rhs ) const;