[SERVER-29919] Consider changing BSONElement::operator[] to take StringData instead of const string& Created: 29/Jun/17 Updated: 30/Oct/23 Resolved: 05/Jul/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.10 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | James Wahlin | Assignee: | James Wahlin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Query 2017-07-10 |
| Participants: |
| Description |
|
It is common in our code base to access BSONObj and BSONElement representing an object via operator[] passing a const c-string for field name. While BSONObj takes StringData for operator[], BSONElement take const string&, which when passed a c-string will result in creation of a std::string object. |
| Comments |
| Comment by Githook User [ 05/Jul/17 ] |
|
Author: {u'username': u'jameswahlin', u'name': u'James Wahlin', u'email': u'james@mongodb.com'}Message: |