diff options
author | Adam <Adam@anope.org> | 2013-02-15 14:22:23 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-02-15 19:01:46 -0500 |
commit | d9c18a6072521bb44418830d2ba1cda14389af20 (patch) | |
tree | 2163f6ba24b315a54a15f6419c194fc2236a1455 /modules/database/db_flatfile.cpp | |
parent | 73099b82e8619a87f894a0f787a582ee973bd177 (diff) |
Store hashes of the last commit instead of the last commit
Diffstat (limited to 'modules/database/db_flatfile.cpp')
-rw-r--r-- | modules/database/db_flatfile.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp index a2db7c1b4..848356574 100644 --- a/modules/database/db_flatfile.cpp +++ b/modules/database/db_flatfile.cpp @@ -71,6 +71,15 @@ class LoadData : public Serialize::Data keys.insert(it->first); return keys; } + + size_t Hash() const anope_override + { + size_t hash = 0; + for (std::map<Anope::string, Anope::string>::const_iterator it = this->data.begin(), it_end = this->data.end(); it != it_end; ++it) + if (!it->second.empty()) + hash ^= Anope::hash_cs()(it->second); + return hash; + } void Reset() { |