summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/value.h
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2015-04-07 16:42:23 -0400
committerEric Milkie <milkie@10gen.com>2015-04-08 16:27:14 -0400
commite87716a9286b6aa6f63a513012e55f6e42f634a2 (patch)
tree06e906a531f9699bc6e5bee143339eee4bf8841a /src/mongo/db/pipeline/value.h
parent655f6f61888035798519a5866dec9f9d76f7c224 (diff)
downloadmongo-e87716a9286b6aa6f63a513012e55f6e42f634a2.tar.gz
SERVER-15047 Remove undefined behavior from Timestamp
Diffstat (limited to 'src/mongo/db/pipeline/value.h')
-rw-r--r--src/mongo/db/pipeline/value.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/value.h b/src/mongo/db/pipeline/value.h
index 4e30c30564d..88856c76df6 100644
--- a/src/mongo/db/pipeline/value.h
+++ b/src/mongo/db/pipeline/value.h
@@ -328,7 +328,9 @@ namespace mongo {
inline Timestamp Value::getTimestamp() const {
verify(getType() == bsonTimestamp);
- return Date_t(_storage.timestampValue);
+ Timestamp ts;
+ ts.readFrom(&_storage.timestampValue);
+ return ts;
}
inline const char* Value::getRegex() const {