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/db/query/lru_key_value_test.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/db/query/lru_key_value_test.cpp')
-rw-r--r-- | src/mongo/db/query/lru_key_value_test.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/query/lru_key_value_test.cpp b/src/mongo/db/query/lru_key_value_test.cpp index 28cc2147dda..da9c9c73f34 100644 --- a/src/mongo/db/query/lru_key_value_test.cpp +++ b/src/mongo/db/query/lru_key_value_test.cpp @@ -97,7 +97,7 @@ namespace { int maxSize = 10; LRUKeyValue<int, int> cache(maxSize); for (int i = 0; i < maxSize; ++i) { - std::auto_ptr<int> evicted = cache.add(i, new int(i)); + std::unique_ptr<int> evicted = cache.add(i, new int(i)); ASSERT(NULL == evicted.get()); } ASSERT_EQUALS(cache.size(), (size_t)maxSize); @@ -110,7 +110,7 @@ namespace { } // Adding another entry causes an eviction. - std::auto_ptr<int> evicted = cache.add(maxSize + 1, new int(maxSize + 1)); + std::unique_ptr<int> evicted = cache.add(maxSize + 1, new int(maxSize + 1)); ASSERT_EQUALS(cache.size(), (size_t)maxSize); ASSERT(NULL != evicted.get()); ASSERT_EQUALS(*evicted, evictKey); @@ -136,7 +136,7 @@ namespace { int maxSize = 10; LRUKeyValue<int, int> cache(maxSize); for (int i = 0; i < maxSize; ++i) { - std::auto_ptr<int> evicted = cache.add(i, new int(i)); + std::unique_ptr<int> evicted = cache.add(i, new int(i)); ASSERT(NULL == evicted.get()); } ASSERT_EQUALS(cache.size(), (size_t)maxSize); @@ -147,7 +147,7 @@ namespace { // Evict all but one of the original entries. for (int i = maxSize; i < (maxSize + maxSize - 1); ++i) { - std::auto_ptr<int> evicted = cache.add(i, new int(i)); + std::unique_ptr<int> evicted = cache.add(i, new int(i)); ASSERT(NULL != evicted.get()); } ASSERT_EQUALS(cache.size(), (size_t)maxSize); |