about summary refs log tree commit diff
path: root/src/hash.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-15T21·24+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-15T21·24+0000
commit7b3f44e05baa49b26dd7c1ed71265c6bbc946aa4 (patch)
tree0823fdc1f082f027031dd2615eade33cf29688c0 /src/hash.cc
parentf5b6fa5256efce5f7a963386cd16e441446f5746 (diff)
* The new normaliser now passes the unit tests.
Diffstat (limited to 'src/hash.cc')
-rw-r--r--src/hash.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/hash.cc b/src/hash.cc
index 72dcd790c7..97bf8f7856 100644
--- a/src/hash.cc
+++ b/src/hash.cc
@@ -28,6 +28,16 @@ bool Hash::operator != (Hash h2)
 }
 
 
+bool Hash::operator < (const Hash & h) const
+{
+    for (unsigned int i = 0; i < hashSize; i++) {
+        if (hash[i] < h.hash[i]) return true;
+        if (hash[i] > h.hash[i]) return false;
+    }
+    return false;
+}
+
+
 Hash::operator string() const
 {
     ostringstream str;