summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/plan_cache_commands_test.cpp
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2015-06-10 17:43:13 -0400
committerAndrew Morrow <acm@mongodb.com>2015-06-10 22:37:44 -0400
commita9b6612f5322f916298c19a6728817a1034c6aab (patch)
tree0da5b1ce36e6a8e2d85dbdeb49d505ac99bf6e1d /src/mongo/db/commands/plan_cache_commands_test.cpp
parent0ec1e625760eb9c1a20a3dba78200e8f9ff28d9e (diff)
downloadmongo-a9b6612f5322f916298c19a6728817a1034c6aab.tar.gz
SERVER-17309 Replace std::auto_ptr<T> with std::unique_ptr<T>
Diffstat (limited to 'src/mongo/db/commands/plan_cache_commands_test.cpp')
-rw-r--r--src/mongo/db/commands/plan_cache_commands_test.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mongo/db/commands/plan_cache_commands_test.cpp b/src/mongo/db/commands/plan_cache_commands_test.cpp
index dd2c0333288..69a9c461a76 100644
--- a/src/mongo/db/commands/plan_cache_commands_test.cpp
+++ b/src/mongo/db/commands/plan_cache_commands_test.cpp
@@ -47,7 +47,7 @@ using namespace mongo;
namespace {
using boost::scoped_ptr;
- using std::auto_ptr;
+ using std::unique_ptr;
using std::string;
using std::vector;
@@ -98,7 +98,7 @@ namespace {
* Utility function to create a SolutionCacheData
*/
SolutionCacheData* createSolutionCacheData() {
- auto_ptr<SolutionCacheData> scd(new SolutionCacheData());
+ unique_ptr<SolutionCacheData> scd(new SolutionCacheData());
scd->tree.reset(new PlanCacheIndexTree());
return scd.release();
}
@@ -107,10 +107,10 @@ namespace {
* Utility function to create a PlanRankingDecision
*/
PlanRankingDecision* createDecision(size_t numPlans) {
- auto_ptr<PlanRankingDecision> why(new PlanRankingDecision());
+ unique_ptr<PlanRankingDecision> why(new PlanRankingDecision());
for (size_t i = 0; i < numPlans; ++i) {
CommonStats common("COLLSCAN");
- auto_ptr<PlanStageStats> stats(new PlanStageStats(common, STAGE_COLLSCAN));
+ unique_ptr<PlanStageStats> stats(new PlanStageStats(common, STAGE_COLLSCAN));
stats->specific.reset(new CollectionScanStats());
why->stats.mutableVector().push_back(stats.release());
why->scores.push_back(0U);
@@ -129,7 +129,7 @@ namespace {
// Create a canonical query
CanonicalQuery* cqRaw;
ASSERT_OK(CanonicalQuery::canonicalize(ns, fromjson("{a: 1}"), &cqRaw));
- auto_ptr<CanonicalQuery> cq(cqRaw);
+ unique_ptr<CanonicalQuery> cq(cqRaw);
// Plan cache with one entry
PlanCache planCache;
@@ -154,7 +154,7 @@ namespace {
// Create a canonical query
CanonicalQuery* cqRaw;
ASSERT_OK(CanonicalQuery::canonicalize(ns, fromjson("{a: 1}"), &cqRaw));
- auto_ptr<CanonicalQuery> cq(cqRaw);
+ unique_ptr<CanonicalQuery> cq(cqRaw);
// Plan cache with one entry
PlanCache planCache;
@@ -261,9 +261,9 @@ namespace {
// Create 2 canonical queries.
CanonicalQuery* cqRaw;
ASSERT_OK(CanonicalQuery::canonicalize(ns, fromjson("{a: 1}"), &cqRaw));
- auto_ptr<CanonicalQuery> cqA(cqRaw);
+ unique_ptr<CanonicalQuery> cqA(cqRaw);
ASSERT_OK(CanonicalQuery::canonicalize(ns, fromjson("{b: 1}"), &cqRaw));
- auto_ptr<CanonicalQuery> cqB(cqRaw);
+ unique_ptr<CanonicalQuery> cqB(cqRaw);
// Create plan cache with 2 entries.
PlanCache planCache;
@@ -378,7 +378,7 @@ namespace {
// Create a canonical query
CanonicalQuery* cqRaw;
ASSERT_OK(CanonicalQuery::canonicalize(ns, fromjson("{a: 1}"), &cqRaw));
- auto_ptr<CanonicalQuery> cq(cqRaw);
+ unique_ptr<CanonicalQuery> cq(cqRaw);
// Plan cache with one entry
PlanCache planCache;
@@ -397,7 +397,7 @@ namespace {
// Create a canonical query
CanonicalQuery* cqRaw;
ASSERT_OK(CanonicalQuery::canonicalize(ns, fromjson("{a: 1}"), &cqRaw));
- auto_ptr<CanonicalQuery> cq(cqRaw);
+ unique_ptr<CanonicalQuery> cq(cqRaw);
// Plan cache with one entry
PlanCache planCache;