diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-06-10 17:43:13 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2015-06-10 22:37:44 -0400 |
commit | a9b6612f5322f916298c19a6728817a1034c6aab (patch) | |
tree | 0da5b1ce36e6a8e2d85dbdeb49d505ac99bf6e1d /src/mongo/dbtests/query_stage_fetch.cpp | |
parent | 0ec1e625760eb9c1a20a3dba78200e8f9ff28d9e (diff) | |
download | mongo-a9b6612f5322f916298c19a6728817a1034c6aab.tar.gz |
SERVER-17309 Replace std::auto_ptr<T> with std::unique_ptr<T>
Diffstat (limited to 'src/mongo/dbtests/query_stage_fetch.cpp')
-rw-r--r-- | src/mongo/dbtests/query_stage_fetch.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/dbtests/query_stage_fetch.cpp b/src/mongo/dbtests/query_stage_fetch.cpp index e33d9b08420..d03a619a9b2 100644 --- a/src/mongo/dbtests/query_stage_fetch.cpp +++ b/src/mongo/dbtests/query_stage_fetch.cpp @@ -48,7 +48,7 @@ namespace QueryStageFetch { using boost::shared_ptr; - using std::auto_ptr; + using std::unique_ptr; using std::set; class QueryStageFetchBase { @@ -108,7 +108,7 @@ namespace QueryStageFetch { ASSERT_EQUALS(size_t(1), locs.size()); // Create a mock stage that returns the WSM. - auto_ptr<QueuedDataStage> mockStage(new QueuedDataStage(&ws)); + unique_ptr<QueuedDataStage> mockStage(new QueuedDataStage(&ws)); // Mock data. { @@ -126,7 +126,7 @@ namespace QueryStageFetch { mockStage->pushBack(mockMember); } - auto_ptr<FetchStage> fetchStage(new FetchStage(&_txn, &ws, mockStage.release(), + unique_ptr<FetchStage> fetchStage(new FetchStage(&_txn, &ws, mockStage.release(), NULL, coll)); WorkingSetID id = WorkingSet::INVALID_ID; @@ -170,7 +170,7 @@ namespace QueryStageFetch { ASSERT_EQUALS(size_t(1), locs.size()); // Create a mock stage that returns the WSM. - auto_ptr<QueuedDataStage> mockStage(new QueuedDataStage(&ws)); + unique_ptr<QueuedDataStage> mockStage(new QueuedDataStage(&ws)); // Mock data. { @@ -188,10 +188,10 @@ namespace QueryStageFetch { BSONObj filterObj = BSON("foo" << 6); StatusWithMatchExpression swme = MatchExpressionParser::parse(filterObj); verify(swme.isOK()); - auto_ptr<MatchExpression> filterExpr(swme.getValue()); + unique_ptr<MatchExpression> filterExpr(swme.getValue()); // Matcher requires that foo==6 but we only have data with foo==5. - auto_ptr<FetchStage> fetchStage( + unique_ptr<FetchStage> fetchStage( new FetchStage(&_txn, &ws, mockStage.release(), filterExpr.get(), coll)); // First call should return a fetch request as it's not in memory. |