summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-12 13:53:48 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-12 13:53:48 +0100
commit8e792d31f499758d3447da46dc85b68356bdbe9b (patch)
treea0545bae9fc9e6c28cf93e449b896e583483bf7f /src
parentf8775b64f67cc464e024cf79cd98eed30c659d25 (diff)
removed __compare magic method, and added operator< instead
Diffstat (limited to 'src')
-rw-r--r--src/base.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/base.cpp b/src/base.cpp
index a77b30f..516663d 100644
--- a/src/base.cpp
+++ b/src/base.cpp
@@ -256,18 +256,14 @@ bool Base::__toBool()
}
/**
- * Compare the object with a different object of the same type
+ * Comparison operator
*
- * This method should return 0 if both objects are equal, a negative value
- * if the 'this' object is smaller, and a positive value if the 'this'
- * object is bigger.
- *
- * The passed in object is an instance of base
+ * Check how a different object compares to this object
*
* @param that Object to compare with
* @return int
*/
-bool Base::__compare(const Base &that) const
+bool Base::operator<(const Base &that) const
{
// throw an exception that will be caught in the ClassBase class,
// so that the default implementation of the function can be called