mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-28 07:59:02 +01:00
SERVER-17596 mongo::OID::asTimeT() and mongo::OID::asDateT() should be const
Signed-off-by: Adam Midvidy <amidvidy@gmail.com> Closes #937
This commit is contained in:
parent
bf52637fde
commit
63cdeb9c56
@ -157,7 +157,7 @@ namespace {
|
||||
kInstanceUniqueSize + kIncrementSize);
|
||||
}
|
||||
|
||||
time_t OID::asTimeT() {
|
||||
time_t OID::asTimeT() const {
|
||||
return getTimestamp();
|
||||
}
|
||||
|
||||
|
@ -139,8 +139,8 @@ namespace mongo {
|
||||
/** Set to the min/max OID that could be generated at given timestamp. */
|
||||
void init( Date_t date, bool max=false );
|
||||
|
||||
time_t asTimeT();
|
||||
Date_t asDateT() { return asTimeT() * 1000LL; }
|
||||
time_t asTimeT() const;
|
||||
Date_t asDateT() const { return asTimeT() * 1000LL; }
|
||||
|
||||
// True iff the OID is not empty
|
||||
bool isSet() const {
|
||||
|
Loading…
Reference in New Issue
Block a user