28 const auto icat = s_hashStore.hashCat.find(
category);
29 if (icat != s_hashStore.hashCat.end()) {
30 const HashMap& cat = icat->second;
37 s_hashStore.hashCat.emplace(
category, std::make_unique<HashMap>());
48 for (
int i = (
int)
s.size()-1;
i >= 0; --
i )
51 for (
int i = 0;
i < (
int)
s.size(); ++
i )
61 cat.name2hash.emplace(
s,
hash);
67 if (
s != itr->second ) {
68 throw std::domain_error(
"Hash collision in category " +
category +
69 " for elements " + itr->second +
" and " +
s);
78 const auto& icat = s_hashStore.hashCat.find(
category);
79 if (icat == s_hashStore.hashCat.end()) {
80 return "UNKNOWN CATEGORY";
83 const HashMap& cat = icat->second;
86 return "UNKNOWN HASH ID";
97 for (
const auto [
hash, nameptr] :
hashes.hash2name) {
98 std::string
name(nameptr);
107 if (!
fin.is_open()) {
114 while(std::getline(
fin,
line)) {
124 std::cerr <<
"Inconsistency in file2hashes(" <<
fileName <<
") function,"
125 " item " <<
name <<
" has hash " <<
hash <<
" not " <<
check << std::endl;