diff options
author | Benety Goh <benety@mongodb.com> | 2018-04-04 21:42:26 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2018-04-04 21:42:26 -0400 |
commit | 80f409d1311eb8d20251d17be474aff382538b84 (patch) | |
tree | a8134ca8928240b84414f8faf75c7af06119915b /src/mongo/db/geo | |
parent | c3badcbbcf069f428a765ba5937106d1da814076 (diff) | |
download | mongo-80f409d1311eb8d20251d17be474aff382538b84.tar.gz |
SERVER-34307 replace invariant(false) with MONGO_UNREACHABLE
Diffstat (limited to 'src/mongo/db/geo')
-rw-r--r-- | src/mongo/db/geo/big_polygon.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/geo/geometry_container.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/geo/geoparser.cpp | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/geo/big_polygon.cpp b/src/mongo/db/geo/big_polygon.cpp index a83a59dd41c..c6eeb23ea4f 100644 --- a/src/mongo/db/geo/big_polygon.cpp +++ b/src/mongo/db/geo/big_polygon.cpp @@ -217,14 +217,14 @@ bool BigSimplePolygon::VirtualContainsPoint(const S2Point& p) const { } void BigSimplePolygon::Encode(Encoder* const encoder) const { - invariant(false); + MONGO_UNREACHABLE; } bool BigSimplePolygon::Decode(Decoder* const decoder) { - invariant(false); + MONGO_UNREACHABLE; } bool BigSimplePolygon::DecodeWithinScope(Decoder* const decoder) { - invariant(false); + MONGO_UNREACHABLE; } } diff --git a/src/mongo/db/geo/geometry_container.cpp b/src/mongo/db/geo/geometry_container.cpp index c9b4b2f3f48..17b566c2f24 100644 --- a/src/mongo/db/geo/geometry_container.cpp +++ b/src/mongo/db/geo/geometry_container.cpp @@ -958,7 +958,7 @@ Status GeometryContainer::parseFromGeoJSON(const BSONObj& obj, bool skipValidati } } else { // Should not reach here. - invariant(false); + MONGO_UNREACHABLE; } // Check parsing result. @@ -1089,7 +1089,7 @@ string GeometryContainer::getDebugType() const { } else if (NULL != _geometryCollection) { return "gc"; } else { - invariant(false); + MONGO_UNREACHABLE; return ""; } } @@ -1116,7 +1116,7 @@ CRS GeometryContainer::getNativeCRS() const { } else if (NULL != _geometryCollection) { return SPHERE; } else { - invariant(false); + MONGO_UNREACHABLE; return FLAT; } } diff --git a/src/mongo/db/geo/geoparser.cpp b/src/mongo/db/geo/geoparser.cpp index e5b09077bd5..5511f620c42 100644 --- a/src/mongo/db/geo/geoparser.cpp +++ b/src/mongo/db/geo/geoparser.cpp @@ -723,7 +723,7 @@ Status GeoParser::parseGeometryCollection(const BSONObj& obj, geoObj, skipValidation, out->multiPolygons.mutableVector().back()); } else { // Should not reach here. - invariant(false); + MONGO_UNREACHABLE; } // Check parsing result. |