From 7b3f44e05baa49b26dd7c1ed71265c6bbc946aa4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 15 Jul 2003 21:24:05 +0000 Subject: * The new normaliser now passes the unit tests. --- src/hash.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/hash.cc') diff --git a/src/hash.cc b/src/hash.cc index 72dcd790c..97bf8f785 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; -- cgit v1.2.3