diff options
Diffstat (limited to 'src/mongo/db/query/plan_cache_test.cpp')
-rw-r--r-- | src/mongo/db/query/plan_cache_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/query/plan_cache_test.cpp b/src/mongo/db/query/plan_cache_test.cpp index 2bee0f5f10b..867f5261d6d 100644 --- a/src/mongo/db/query/plan_cache_test.cpp +++ b/src/mongo/db/query/plan_cache_test.cpp @@ -135,7 +135,7 @@ unique_ptr<CanonicalQuery> canonicalize(const char* queryStr, /** * Utility function to create MatchExpression */ -MatchExpression* parseMatchExpression(const BSONObj& obj) { +unique_ptr<MatchExpression> parseMatchExpression(const BSONObj& obj) { StatusWithMatchExpression status = MatchExpressionParser::parse(obj); if (!status.isOK()) { str::stream ss; @@ -143,8 +143,8 @@ MatchExpression* parseMatchExpression(const BSONObj& obj) { << ". Reason: " << status.getStatus().toString(); FAIL(ss); } - MatchExpression* expr(status.getValue()); - return expr; + + return std::move(status.getValue()); } void assertEquivalent(const char* queryStr, |