summaryrefslogtreecommitdiff
path: root/util/optime.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-07-26 16:25:15 -0400
committerEliot Horowitz <eliot@10gen.com>2010-07-26 16:25:15 -0400
commitbe796737a7782ea62d6d010863256b5172d8e65f (patch)
tree06cb30721af48801376e7b393b3316cf9757e39d /util/optime.h
parentcbb44f9adb430c66d91a5823a8ebb81d7ca4ad0b (diff)
downloadmongo-be796737a7782ea62d6d010863256b5172d8e65f.tar.gz
better cast
Diffstat (limited to 'util/optime.h')
-rw-r--r--util/optime.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/util/optime.h b/util/optime.h
index 1483c9ac9c1..d9c959fa00c 100644
--- a/util/optime.h
+++ b/util/optime.h
@@ -92,12 +92,11 @@ namespace mongo {
bytes of overhead.
*/
unsigned long long asDate() const {
- return *((unsigned long long *) &i);
+ return reinterpret_cast<const unsigned long long*>(&i)[0];
}
long long asLL() const {
- return *((long long *) &i);
+ return reinterpret_cast<const long long*>(&i)[0];
}
- // unsigned long long& asDate() { return *((unsigned long long *) &i); }
bool isNull() const { return secs == 0; }