summaryrefslogtreecommitdiff
path: root/src/mongo/db/geo
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2015-01-04 12:23:38 -0500
committerAndrew Morrow <acm@mongodb.com>2015-01-05 18:52:20 -0500
commite782819da4ce547272c653ec85984cacf5e60ff2 (patch)
tree4ed2ffdbe2c74634ed836cde991a2bdd2c9f7bf9 /src/mongo/db/geo
parent0c4d932be42022627cd1e8a826fc69cd3edac23f (diff)
downloadmongo-e782819da4ce547272c653ec85984cacf5e60ff2.tar.gz
SERVER-13256 Remove scoped_ptr from pch.h
Diffstat (limited to 'src/mongo/db/geo')
-rw-r--r--src/mongo/db/geo/big_polygon.cpp1
-rw-r--r--src/mongo/db/geo/geometry_container.h23
-rw-r--r--src/mongo/db/geo/r2_region_coverer.h5
-rw-r--r--src/mongo/db/geo/shapes.h9
4 files changed, 21 insertions, 17 deletions
diff --git a/src/mongo/db/geo/big_polygon.cpp b/src/mongo/db/geo/big_polygon.cpp
index 2f7c20871c6..eb6540651cb 100644
--- a/src/mongo/db/geo/big_polygon.cpp
+++ b/src/mongo/db/geo/big_polygon.cpp
@@ -28,6 +28,7 @@
#include "mongo/db/geo/big_polygon.h"
+#include <boost/scoped_ptr.hpp>
#include <map>
#include "mongo/base/owned_pointer_vector.h"
diff --git a/src/mongo/db/geo/geometry_container.h b/src/mongo/db/geo/geometry_container.h
index 501b17ce687..415f603d178 100644
--- a/src/mongo/db/geo/geometry_container.h
+++ b/src/mongo/db/geo/geometry_container.h
@@ -28,6 +28,7 @@
#pragma once
+#include <boost/scoped_ptr.hpp>
#include <string>
#include "mongo/base/disallow_copying.h"
@@ -142,20 +143,20 @@ namespace mongo {
// Only one of these shared_ptrs should be non-NULL. S2Region is a
// superclass but it only supports testing against S2Cells. We need
// the most specific class we can get.
- scoped_ptr<PointWithCRS> _point;
- scoped_ptr<LineWithCRS> _line;
- scoped_ptr<BoxWithCRS> _box;
- scoped_ptr<PolygonWithCRS> _polygon;
- scoped_ptr<CapWithCRS> _cap;
- scoped_ptr<MultiPointWithCRS> _multiPoint;
- scoped_ptr<MultiLineWithCRS> _multiLine;
- scoped_ptr<MultiPolygonWithCRS> _multiPolygon;
- scoped_ptr<GeometryCollection> _geometryCollection;
+ boost::scoped_ptr<PointWithCRS> _point;
+ boost::scoped_ptr<LineWithCRS> _line;
+ boost::scoped_ptr<BoxWithCRS> _box;
+ boost::scoped_ptr<PolygonWithCRS> _polygon;
+ boost::scoped_ptr<CapWithCRS> _cap;
+ boost::scoped_ptr<MultiPointWithCRS> _multiPoint;
+ boost::scoped_ptr<MultiLineWithCRS> _multiLine;
+ boost::scoped_ptr<MultiPolygonWithCRS> _multiPolygon;
+ boost::scoped_ptr<GeometryCollection> _geometryCollection;
// Cached for use during covering calculations
// TODO: _s2Region is currently generated immediately - don't necessarily need to do this
- scoped_ptr<S2RegionUnion> _s2Region;
- scoped_ptr<R2Region> _r2Region;
+ boost::scoped_ptr<S2RegionUnion> _s2Region;
+ boost::scoped_ptr<R2Region> _r2Region;
};
} // namespace mongo
diff --git a/src/mongo/db/geo/r2_region_coverer.h b/src/mongo/db/geo/r2_region_coverer.h
index d3c0620535d..e95da0228a6 100644
--- a/src/mongo/db/geo/r2_region_coverer.h
+++ b/src/mongo/db/geo/r2_region_coverer.h
@@ -28,6 +28,7 @@
#pragma once
+#include <boost/scoped_ptr.hpp>
#include <queue>
#include "mongo/db/geo/hash.h"
@@ -107,8 +108,8 @@ namespace mongo {
typedef pair<int, Candidate*> QueueEntry;
typedef priority_queue<QueueEntry, vector<QueueEntry>,
CompareQueueEntries> CandidateQueue;
- scoped_ptr<CandidateQueue> _candidateQueue; // Priority queue owns candidate pointers.
- scoped_ptr<vector<GeoHash> > _results;
+ boost::scoped_ptr<CandidateQueue> _candidateQueue; // Priority queue owns candidate pointers.
+ boost::scoped_ptr<vector<GeoHash> > _results;
};
diff --git a/src/mongo/db/geo/shapes.h b/src/mongo/db/geo/shapes.h
index 074c71d2e4e..d67643f7823 100644
--- a/src/mongo/db/geo/shapes.h
+++ b/src/mongo/db/geo/shapes.h
@@ -28,6 +28,7 @@
#pragma once
+#include <boost/scoped_ptr.hpp>
#include <cmath>
#include <string>
#include <vector>
@@ -190,8 +191,8 @@ namespace mongo {
std::vector<Point> _points;
// Cached attributes of the polygon
- mutable scoped_ptr<Box> _bounds;
- mutable scoped_ptr<Point> _centroid;
+ mutable boost::scoped_ptr<Box> _bounds;
+ mutable boost::scoped_ptr<Point> _centroid;
};
class R2Region {
@@ -300,10 +301,10 @@ namespace mongo {
PolygonWithCRS() : crs(UNSET) {}
- scoped_ptr<S2Polygon> s2Polygon;
+ boost::scoped_ptr<S2Polygon> s2Polygon;
// Simple polygons with strict winding order may be bigger or smaller than a hemisphere.
// Only used for query. We don't support storing/indexing big polygons.
- scoped_ptr<BigSimplePolygon> bigPolygon;
+ boost::scoped_ptr<BigSimplePolygon> bigPolygon;
Polygon oldPolygon;
CRS crs;