summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/expression_tree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/matcher/expression_tree.cpp')
-rw-r--r--src/mongo/db/matcher/expression_tree.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mongo/db/matcher/expression_tree.cpp b/src/mongo/db/matcher/expression_tree.cpp
index 5dae4cb0f6b..b6c50ae21a2 100644
--- a/src/mongo/db/matcher/expression_tree.cpp
+++ b/src/mongo/db/matcher/expression_tree.cpp
@@ -455,11 +455,7 @@ void NotMatchExpression::serializeNotExpressionToNor(MatchExpression* exp,
void NotMatchExpression::serialize(BSONObjBuilder* out, SerializationOptions opts) const {
if (_exp->matchType() == MatchType::AND && _exp->numChildren() == 0) {
- if (opts.replacementForLiteralArgs) {
- out->append("$alwaysFalse", *opts.replacementForLiteralArgs);
- } else {
- out->append("$alwaysFalse", 1);
- }
+ opts.appendLiteral(out, "$alwaysFalse", 1);
return;
}