diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2018-03-23 15:13:35 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2018-03-23 15:13:35 -0400 |
commit | 962eb29eac3b8122871a14190d43799a7963d948 (patch) | |
tree | 450a5c57fc0dba147fc25a75ae496937708734ce | |
parent | d0bf5fbe535b71e3127d59a01e7fab80425f66e6 (diff) | |
download | mongo-962eb29eac3b8122871a14190d43799a7963d948.tar.gz |
SERVER-34106 Remove all uses of `std::auto_ptr`.
-rw-r--r-- | src/mongo/db/geo/r2_region_coverer_test.cpp | 6 | ||||
-rw-r--r-- | src/mongo/util/unowned_ptr.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/geo/r2_region_coverer_test.cpp b/src/mongo/db/geo/r2_region_coverer_test.cpp index 6ae997d0ee5..4a627dc47ac 100644 --- a/src/mongo/db/geo/r2_region_coverer_test.cpp +++ b/src/mongo/db/geo/r2_region_coverer_test.cpp @@ -29,6 +29,7 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kGeo #include <chrono> +#include <memory> #include <random> #include "mongo/db/geo/r2_region_coverer.h" @@ -42,7 +43,6 @@ namespace { -using std::auto_ptr; using namespace mongo; using mongo::Polygon; // "windows.h" has another Polygon for Windows GDI. @@ -299,7 +299,7 @@ TEST(R2RegionCoverer, RandomCircles) { coverer.setMaxLevel(coverer.minLevel() + 4); double radius = randDouble(0.0, MAXBOUND / 2); - auto_ptr<GeometryContainer> geometry(getRandomCircle(radius)); + std::unique_ptr<GeometryContainer> geometry(getRandomCircle(radius)); const R2Region& region = geometry->getR2Region(); vector<GeoHash> covering; @@ -322,7 +322,7 @@ TEST(R2RegionCoverer, RandomTinyCircles) { // 100 * 2 ^ -32 ~= 2.3E-8 (cell edge length) double radius = randDouble(1E-15, ldexp(100.0, -32) * 10); - auto_ptr<GeometryContainer> geometry(getRandomCircle(radius)); + std::unique_ptr<GeometryContainer> geometry(getRandomCircle(radius)); const R2Region& region = geometry->getR2Region(); vector<GeoHash> covering; diff --git a/src/mongo/util/unowned_ptr.h b/src/mongo/util/unowned_ptr.h index 775edd7c9f8..e34f9a93dd2 100644 --- a/src/mongo/util/unowned_ptr.h +++ b/src/mongo/util/unowned_ptr.h @@ -35,7 +35,7 @@ namespace mongo { /** * A "smart" pointer that explicitly indicates a lack of ownership. - * It will implicitly convert from any compatible pointer type except auto_ptr. + * It will implicitly convert from any compatible pointer type. * * Note that like other pointer types const applies to the pointer not the pointee: * - const unowned_ptr<T> => T* const |