0
0
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:
root 2015-03-16 02:12:41 +00:00 committed by Adam Midvidy
parent bf52637fde
commit 63cdeb9c56
2 changed files with 3 additions and 3 deletions

View File

@ -157,7 +157,7 @@ namespace {
kInstanceUniqueSize + kIncrementSize);
}
time_t OID::asTimeT() {
time_t OID::asTimeT() const {
return getTimestamp();
}

View File

@ -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 {