diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-15T21·24+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-15T21·24+0000 |
commit | 7b3f44e05baa49b26dd7c1ed71265c6bbc946aa4 (patch) | |
tree | 0823fdc1f082f027031dd2615eade33cf29688c0 /src/hash.cc | |
parent | f5b6fa5256efce5f7a963386cd16e441446f5746 (diff) |
* The new normaliser now passes the unit tests.
Diffstat (limited to 'src/hash.cc')
-rw-r--r-- | src/hash.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/hash.cc b/src/hash.cc index 72dcd790c7dc..97bf8f7856f0 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; |