diff options
author | Jason Carey (hanumantmk) <jcarey@argv.me> | 2015-03-19 16:37:54 -0400 |
---|---|---|
committer | Jason Carey (hanumantmk) <jcarey@argv.me> | 2015-04-14 14:32:49 -0400 |
commit | 67829601c0e4516f70a59140c8971f5111372b8b (patch) | |
tree | 34a85a1f43b16c5e29d47767315d5dd0d04cbf08 /src/mongo/db/dbmessage.cpp | |
parent | 8bd99fa7bd4387abeb5f6ddf0907b36f67d9c702 (diff) | |
download | mongo-67829601c0e4516f70a59140c8971f5111372b8b.tar.gz |
SERVER-17629 Implemented Bounded Data View/Cursor
Implements DataRange and DataRangeCursor, bounded Status returning
variants of DataView and DataCursor.
Implements DataType::Handler<> to allow for specialization by type.
* Endian specializations
* BSONObj specialization
Fix for endian conversions for floats and doubles to avoid some
signaling bit patterns.
Diffstat (limited to 'src/mongo/db/dbmessage.cpp')
-rw-r--r-- | src/mongo/db/dbmessage.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/dbmessage.cpp b/src/mongo/db/dbmessage.cpp index 95593ab545a..2dbbce7704a 100644 --- a/src/mongo/db/dbmessage.cpp +++ b/src/mongo/db/dbmessage.cpp @@ -103,7 +103,7 @@ namespace mongo { const char* p = _nsStart + _nsLen + 1; checkRead<int>(p, 2); - return ConstDataView(p).readLE<int32_t>(sizeof(int32_t)); + return ConstDataView(p).read<LittleEndian<int32_t>>(sizeof(int32_t)); } int DbMessage::pullInt() { @@ -161,7 +161,7 @@ namespace mongo { T DbMessage::read() const { checkRead<T>(_nextjsobj, 1); - return ConstDataView(_nextjsobj).readLE<T>(); + return ConstDataView(_nextjsobj).read<LittleEndian<T>>(); } template<typename T> T DbMessage::readAndAdvance() { |