mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
first commit
This commit is contained in:
commit
98661d9b67
65 changed files with 16558 additions and 0 deletions
34
ext/crow/ci_map.h
Normal file
34
ext/crow/ci_map.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#pragma once
|
||||
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace crow
|
||||
{
|
||||
struct ci_hash
|
||||
{
|
||||
size_t operator()(const std::string& key) const
|
||||
{
|
||||
std::size_t seed = 0;
|
||||
std::locale locale;
|
||||
|
||||
for(auto c : key)
|
||||
{
|
||||
boost::hash_combine(seed, std::toupper(c, locale));
|
||||
}
|
||||
|
||||
return seed;
|
||||
}
|
||||
};
|
||||
|
||||
struct ci_key_eq
|
||||
{
|
||||
bool operator()(const std::string& l, const std::string& r) const
|
||||
{
|
||||
return boost::iequals(l, r);
|
||||
}
|
||||
};
|
||||
|
||||
using ci_map = std::unordered_multimap<std::string, std::string, ci_hash, ci_key_eq>;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue