From 7e986cc77f121e3af9a5f1217e89913745fc07f9 Mon Sep 17 00:00:00 2001 From: David Storch Date: Fri, 15 Jul 2016 18:15:12 -0400 Subject: SERVER-23990 add ValueComparator::Hasher for collation-aware Value hashing --- src/mongo/db/pipeline/document.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/pipeline/document.cpp') diff --git a/src/mongo/db/pipeline/document.cpp b/src/mongo/db/pipeline/document.cpp index df2eb8facdf..62ac9c1ac32 100644 --- a/src/mongo/db/pipeline/document.cpp +++ b/src/mongo/db/pipeline/document.cpp @@ -373,11 +373,12 @@ size_t Document::getApproximateSize() const { return size; } -void Document::hash_combine(size_t& seed) const { +void Document::hash_combine(size_t& seed, + const StringData::ComparatorInterface* stringComparator) const { for (DocumentStorageIterator it = storage().iterator(); !it.atEnd(); it.advance()) { StringData name = it->nameSD(); boost::hash_range(seed, name.rawData(), name.rawData() + name.size()); - it->val.hash_combine(seed); + it->val.hash_combine(seed, stringComparator); } } -- cgit v1.2.1