mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-01-19 09:36:47 +02:00
Simplify PosIdx::hash()
In C++ we don't need to salt the hash.
This commit is contained in:
parent
d0e9878389
commit
f5ebaea277
1 changed files with 2 additions and 5 deletions
|
@ -1,8 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
#include <functional>
|
||||||
#include "std-hash.hh"
|
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
@ -43,9 +42,7 @@ public:
|
||||||
|
|
||||||
size_t hash() const noexcept
|
size_t hash() const noexcept
|
||||||
{
|
{
|
||||||
size_t h = 854125;
|
return std::hash<uint32_t>{}(id);
|
||||||
hash_combine(h, id);
|
|
||||||
return h;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue