summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/schema/expression_internal_schema_allowed_properties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/matcher/schema/expression_internal_schema_allowed_properties.cpp')
-rw-r--r--src/mongo/db/matcher/schema/expression_internal_schema_allowed_properties.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/matcher/schema/expression_internal_schema_allowed_properties.cpp b/src/mongo/db/matcher/schema/expression_internal_schema_allowed_properties.cpp
index 5d86e5571d2..ebb924ed966 100644
--- a/src/mongo/db/matcher/schema/expression_internal_schema_allowed_properties.cpp
+++ b/src/mongo/db/matcher/schema/expression_internal_schema_allowed_properties.cpp
@@ -157,20 +157,19 @@ void InternalSchemaAllowedPropertiesMatchExpression::serialize(BSONObjBuilder* b
expressionBuilder.doneFast();
}
-std::unique_ptr<MatchExpression> InternalSchemaAllowedPropertiesMatchExpression::shallowClone()
- const {
+std::unique_ptr<MatchExpression> InternalSchemaAllowedPropertiesMatchExpression::clone() const {
std::vector<PatternSchema> clonedPatternProperties;
clonedPatternProperties.reserve(_patternProperties.size());
for (auto&& constraint : _patternProperties) {
clonedPatternProperties.emplace_back(Pattern(constraint.first.rawRegex),
- constraint.second->shallowClone());
+ constraint.second->clone());
}
auto clone = std::make_unique<InternalSchemaAllowedPropertiesMatchExpression>(
_properties,
_namePlaceholder,
std::move(clonedPatternProperties),
- _otherwise->shallowClone(),
+ _otherwise->clone(),
_errorAnnotation);
return {std::move(clone)};
}