mirror of
https://github.com/NixOS/nix.git
synced 2025-12-13 04:21:04 +01:00
* The new normaliser now passes the unit tests.
This commit is contained in:
parent
f5b6fa5256
commit
7b3f44e05b
7 changed files with 179 additions and 34 deletions
10
src/hash.cc
10
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue