summaryrefslogtreecommitdiff
path: root/src/mongo/bson/bsonelement.cpp
diff options
context:
space:
mode:
authorJames Wahlin <james@mongodb.com>2017-07-05 12:08:19 -0400
committerJames Wahlin <james@mongodb.com>2017-07-05 12:08:19 -0400
commitb5466d26199389c192814bf9f7e5d618ca6ec588 (patch)
tree14621f74fed902c0b651ef303abcc1601d49ef08 /src/mongo/bson/bsonelement.cpp
parenta3f9f13e3711ddf7a263259e0c494bf4d2926ff5 (diff)
downloadmongo-b5466d26199389c192814bf9f7e5d618ca6ec588.tar.gz
SERVER-29919 Change BSONElement::operator[] to take field as StringData
Diffstat (limited to 'src/mongo/bson/bsonelement.cpp')
-rw-r--r--src/mongo/bson/bsonelement.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/bson/bsonelement.cpp b/src/mongo/bson/bsonelement.cpp
index 77f5b7eb4ad..f82ba99e8f3 100644
--- a/src/mongo/bson/bsonelement.cpp
+++ b/src/mongo/bson/bsonelement.cpp
@@ -478,7 +478,7 @@ BSONObj BSONElement::Obj() const {
return embeddedObjectUserCheck();
}
-BSONElement BSONElement::operator[](const std::string& field) const {
+BSONElement BSONElement::operator[](StringData field) const {
BSONObj o = Obj();
return o[field];
}