Skip to content

Commit 624146f

Browse files
mapxamidvidy
authored andcommitted
CXX-560 Mark mongo::OID::asTimeT() and mongo::OID::asDateT() const
1 parent 5384645 commit 624146f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/mongo/bson/oid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ namespace {
145145
kInstanceUniqueSize + kIncrementSize);
146146
}
147147

148-
time_t OID::asTimeT() {
148+
time_t OID::asTimeT() const {
149149
return getTimestamp();
150150
}
151151

src/mongo/bson/oid.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ namespace mongo {
128128
/** Set to the min/max OID that could be generated at given timestamp. */
129129
void init( Date_t date, bool max=false );
130130

131-
time_t asTimeT();
132-
Date_t asDateT() { return asTimeT() * 1000LL; }
131+
time_t asTimeT() const;
132+
Date_t asDateT() const { return asTimeT() * 1000LL; }
133133

134134
// True iff the OID is not empty
135135
bool isSet() const {

0 commit comments

Comments
 (0)