summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression.cpp
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2017-02-15 11:47:54 -0500
committerTess Avitabile <tess.avitabile@mongodb.com>2017-02-16 09:33:13 -0500
commit89d37b751cb9404a81a33f4effc5c4657a17b359 (patch)
tree5338cfaf4993157f4bb0fcd5cf6c416c758b114a /src/mongo/db/matcher/expression.cpp
parent38c0eb538d0fd390c6cb9ce9ae9894153f6e8ef5 (diff)
downloadmongo-89d37b751cb9404a81a33f4effc5c4657a17b359.tar.gz
SERVER-28017 ne should respect the collection default collation
Diffstat (limited to 'src/mongo/db/matcher/expression.cpp')
-rw-r--r--src/mongo/db/matcher/expression.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mongo/db/matcher/expression.cpp b/src/mongo/db/matcher/expression.cpp
index bf101072336..1d73c790a69 100644
--- a/src/mongo/db/matcher/expression.cpp
+++ b/src/mongo/db/matcher/expression.cpp
@@ -56,11 +56,8 @@ bool MatchExpression::matchesBSON(const BSONObj& doc, MatchDetails* details) con
}
void MatchExpression::setCollator(const CollatorInterface* collator) {
- auto children = getChildVector();
- if (children) {
- for (auto child : *children) {
- child->setCollator(collator);
- }
+ for (size_t i = 0; i < numChildren(); ++i) {
+ getChild(i)->setCollator(collator);
}
_doSetCollator(collator);