mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 23:20:05 +00:00
Hash utility
This commit is contained in:
parent
8d2fcf3802
commit
32e8ca72a0
3 changed files with 43 additions and 0 deletions
20
wxdata/source/scwx/util/hash.cpp
Normal file
20
wxdata/source/scwx/util/hash.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include <scwx/util/hash.hpp>
|
||||
|
||||
#include <boost/container_hash/hash.hpp>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace util
|
||||
{
|
||||
|
||||
size_t hash<std::pair<std::string, std::string>>::operator()(
|
||||
const std::pair<std::string, std::string>& x) const
|
||||
{
|
||||
size_t seed = 0;
|
||||
boost::hash_combine(seed, x.first);
|
||||
boost::hash_combine(seed, x.second);
|
||||
return seed;
|
||||
}
|
||||
|
||||
} // namespace util
|
||||
} // namespace scwx
|
||||
Loading…
Add table
Add a link
Reference in a new issue