summaryrefslogtreecommitdiff
path: root/src/mongo/db/geo
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2019-04-03 18:16:29 -0400
committerBilly Donahue <billy.donahue@mongodb.com>2019-04-08 12:15:08 -0400
commit573921791c4d20e0d1603fd0a200d90d74b65bd5 (patch)
tree9ec3957126fecc636cb31874376f09b6161965ff /src/mongo/db/geo
parentf8f872e029ba3b1f32d8499c912756d48dc1a03b (diff)
downloadmongo-573921791c4d20e0d1603fd0a200d90d74b65bd5.tar.gz
SERVER-40476 remove mongoutils::str::equals
Diffstat (limited to 'src/mongo/db/geo')
-rw-r--r--src/mongo/db/geo/geometry_container.cpp2
-rw-r--r--src/mongo/db/geo/geoparser.cpp12
2 files changed, 6 insertions, 8 deletions
diff --git a/src/mongo/db/geo/geometry_container.cpp b/src/mongo/db/geo/geometry_container.cpp
index 2d529afd8aa..bea64bf8f0f 100644
--- a/src/mongo/db/geo/geometry_container.cpp
+++ b/src/mongo/db/geo/geometry_container.cpp
@@ -36,8 +36,6 @@
namespace mongo {
-using mongoutils::str::equals;
-
bool GeometryContainer::isSimpleContainer() const {
return NULL != _point || NULL != _line || NULL != _polygon;
}
diff --git a/src/mongo/db/geo/geoparser.cpp b/src/mongo/db/geo/geoparser.cpp
index 4156f4d7b77..c5a723805b2 100644
--- a/src/mongo/db/geo/geoparser.cpp
+++ b/src/mongo/db/geo/geoparser.cpp
@@ -776,16 +776,16 @@ GeoParser::GeoSpecifier GeoParser::parseGeoSpecifier(const BSONElement& type) {
if (!type.isABSONObj()) {
return GeoParser::UNKNOWN;
}
- const char* fieldName = type.fieldName();
- if (mongoutils::str::equals(fieldName, "$box")) {
+ StringData fieldName = type.fieldNameStringData();
+ if (fieldName == "$box") {
return GeoParser::BOX;
- } else if (mongoutils::str::equals(fieldName, "$center")) {
+ } else if (fieldName == "$center") {
return GeoParser::CENTER;
- } else if (mongoutils::str::equals(fieldName, "$polygon")) {
+ } else if (fieldName == "$polygon") {
return GeoParser::POLYGON;
- } else if (mongoutils::str::equals(fieldName, "$centerSphere")) {
+ } else if (fieldName == "$centerSphere") {
return GeoParser::CENTER_SPHERE;
- } else if (mongoutils::str::equals(fieldName, "$geometry")) {
+ } else if (fieldName == "$geometry") {
return GeoParser::GEOMETRY;
}
return GeoParser::UNKNOWN;