diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2014-08-27 18:31:04 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2014-09-15 15:37:28 -0400 |
commit | 13617e4a80f2d1be45f2b6f237e0f13b1d1c68a0 (patch) | |
tree | 20cf5601dfc7399ddfd46dd9c8a215257563e9ba /src/mongo/db/exec/geo_near.cpp | |
parent | 8ffb9fae4fc1dbc6519bf4b04ac9316616c2efdf (diff) | |
download | mongo-13617e4a80f2d1be45f2b6f237e0f13b1d1c68a0.tar.gz |
SERVER-14508 Rewrite geo parsing using Status
Diffstat (limited to 'src/mongo/db/exec/geo_near.cpp')
-rw-r--r-- | src/mongo/db/exec/geo_near.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mongo/db/exec/geo_near.cpp b/src/mongo/db/exec/geo_near.cpp index f5217d068b6..452444c3c31 100644 --- a/src/mongo/db/exec/geo_near.cpp +++ b/src/mongo/db/exec/geo_near.cpp @@ -68,7 +68,7 @@ namespace mongo { return NULL; auto_ptr<StoredGeometry> stored(new StoredGeometry); - if (!stored->geometry.parseFrom(element.Obj())) + if (!stored->geometry.parseFromStorage(element).isOK()) return NULL; stored->element = element; return stored.release(); @@ -326,12 +326,8 @@ namespace mongo { if (!e.isABSONObj()) return false; - if (!GeoParser::isIndexablePoint(e.Obj())) - return false; - PointWithCRS point; - if (!GeoParser::parsePoint(e.Obj(), &point)) - return false; + if (!GeoParser::parseStoredPoint(e, &point).isOK()) return false; return _annulus.contains(point.oldPoint); } |