[CXX-560] mongo::OID::asTimeT() and mongo::OID::asDateT() should be const Created: 15/Mar/15 Updated: 06/Dec/16 Resolved: 16/Mar/15 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | API, Performance |
| Affects Version/s: | legacy-1.0.0 |
| Fix Version/s: | legacy-1.0.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Peng Xie | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | legacy-cxx | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
As mongo::OID::asDateT() calls mongo::OID::asTimeT(), which calls OID::getTimestamp(), which is a const member function, mongo::OID::asDateT() and mongo::OID::asTimeT() should also be marked as const. |
| Comments |
| Comment by Githook User [ 16/Mar/15 ] |
|
Author: {u'username': u'mapx', u'name': u'yuchen.xie', u'email': u'yuchen.xie@live.com'}Message: |
| Comment by Peng Xie [ 16/Mar/15 ] |
|
Hi Adam, I did what you told me to do. That's very insteresting! Thanks! |
| Comment by Adam Midvidy [ 15/Mar/15 ] |
|
Hey Yuchen. I agree that these member functions should be marked const. I will merge this PR tomorrow. If you'd like, you can also open the same PR on the mongodb/mongo project, and then file a ticket on the SERVER project - as this code is the same in the MongoDB server! For that you will need to sign a contributors agreement: https://www.mongodb.com/legal/contributor-agreement. Thanks again for contributing! Adam |