summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands
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/commands
parentf8f872e029ba3b1f32d8499c912756d48dc1a03b (diff)
downloadmongo-573921791c4d20e0d1603fd0a200d90d74b65bd5.tar.gz
SERVER-40476 remove mongoutils::str::equals
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r--src/mongo/db/commands/list_collections.cpp4
-rw-r--r--src/mongo/db/commands/mr.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/commands/list_collections.cpp b/src/mongo/db/commands/list_collections.cpp
index 9080535db4a..1ddf5820be2 100644
--- a/src/mongo/db/commands/list_collections.cpp
+++ b/src/mongo/db/commands/list_collections.cpp
@@ -90,7 +90,7 @@ boost::optional<vector<StringData>> _getExactNameMatches(const MatchExpression*
if (matchType == MatchExpression::EQ) {
auto eqMatch = checked_cast<const EqualityMatchExpression*>(matcher);
if (eqMatch->path() == "name") {
- StringData name(eqMatch->getData().valuestrsafe());
+ StringData name(eqMatch->getData().valueStringDataSafe());
if (name.size()) {
return {vector<StringData>{name}};
} else {
@@ -102,7 +102,7 @@ boost::optional<vector<StringData>> _getExactNameMatches(const MatchExpression*
if (matchIn->path() == "name" && matchIn->getRegexes().empty()) {
vector<StringData> exactMatches;
for (auto&& elem : matchIn->getEqualities()) {
- StringData name(elem.valuestrsafe());
+ StringData name(elem.valueStringDataSafe());
if (name.size()) {
exactMatches.push_back(elem.valueStringData());
}
diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp
index 217db0ed3d5..99dacfecbfa 100644
--- a/src/mongo/db/commands/mr.cpp
+++ b/src/mongo/db/commands/mr.cpp
@@ -558,7 +558,7 @@ void State::prepTempCollection() {
BSONObjIterator j(currIndex->infoObj());
while (j.more()) {
BSONElement e = j.next();
- if (str::equals(e.fieldName(), "_id") || str::equals(e.fieldName(), "ns"))
+ if (e.fieldNameStringData() == "_id" || e.fieldNameStringData() == "ns")
continue;
b.append(e);
}