summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2016-07-15 18:15:12 -0400
committerDavid Storch <david.storch@10gen.com>2016-07-19 22:35:21 -0400
commit7e986cc77f121e3af9a5f1217e89913745fc07f9 (patch)
treee29c4ec325199937b2723a500a462e6c125616ea /src/mongo/db/pipeline/document.cpp
parent0b32158c9cb44b31078ca923ef5c8fff755c952a (diff)
downloadmongo-7e986cc77f121e3af9a5f1217e89913745fc07f9.tar.gz
SERVER-23990 add ValueComparator::Hasher for collation-aware Value hashing
Diffstat (limited to 'src/mongo/db/pipeline/document.cpp')
-rw-r--r--src/mongo/db/pipeline/document.cpp5
1 files changed, 3 insertions, 2 deletions
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);
}
}