1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 14:56:39 +02:00

Implement serializer hashing in db_json.

This commit is contained in:
Sadie Powell
2025-06-21 00:31:02 +01:00
parent 80b8856254
commit 2850e3c65c
+12
View File
@@ -81,6 +81,18 @@ public:
{
return data[key];
}
size_t Hash() const override
{
size_t hash = 0;
for (const auto &[_, value] : this->data)
{
auto valuestr = value.str();
if (!valuestr.empty())
hash ^= Anope::hash_cs()(valuestr);
}
return hash;
}
};
class DBJSON final