diff options
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; |