[SERVER-491] BSONObj::getObjectID should be const qualified Created: 16/Dec/09 Updated: 12/Jul/16 Resolved: 16/Dec/09 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Client |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | 1.3.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Ianiv Schweber | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
BSONObj::getObjectID is declared as: bool getObjectID(BSONElement& e); but it does not change the BSONObj, so just like the rest of the field getters, it should be const: bool getObjectID(BSONElement& e) const; That const_cast in my code is looking ugly |
| Comments |
| Comment by auto [ 16/Dec/09 ] |
|
Author: {'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: make getObjectid const |