From be8a683771004a2541c730a1ac0e35cd13e03a8b Mon Sep 17 00:00:00 2001 From: Qingyang Chen Date: Mon, 3 Aug 2015 12:17:47 -0400 Subject: SERVER-19364 move query stage OperationContext pointer management into the base class --- src/mongo/dbtests/query_stage_fetch.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mongo/dbtests/query_stage_fetch.cpp') diff --git a/src/mongo/dbtests/query_stage_fetch.cpp b/src/mongo/dbtests/query_stage_fetch.cpp index f7a255ba482..fce4be75848 100644 --- a/src/mongo/dbtests/query_stage_fetch.cpp +++ b/src/mongo/dbtests/query_stage_fetch.cpp @@ -43,12 +43,14 @@ #include "mongo/db/matcher/expression_parser.h" #include "mongo/db/operation_context_impl.h" #include "mongo/dbtests/dbtests.h" +#include "mongo/stdx/memory.h" namespace QueryStageFetch { +using std::set; using std::shared_ptr; using std::unique_ptr; -using std::set; +using stdx::make_unique; class QueryStageFetchBase { public: @@ -107,7 +109,7 @@ public: ASSERT_EQUALS(size_t(1), locs.size()); // Create a mock stage that returns the WSM. - unique_ptr mockStage(new QueuedDataStage(&ws)); + auto mockStage = make_unique(&_txn, &ws); // Mock data. { @@ -173,7 +175,7 @@ public: ASSERT_EQUALS(size_t(1), locs.size()); // Create a mock stage that returns the WSM. - unique_ptr mockStage(new QueuedDataStage(&ws)); + auto mockStage = make_unique(&_txn, &ws); // Mock data. { -- cgit v1.2.1