summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbmessage.cpp
diff options
context:
space:
mode:
authorA. Jesse Jiryu Davis <jesse@mongodb.com>2019-06-14 16:42:10 -0400
committerA. Jesse Jiryu Davis <jesse@mongodb.com>2019-06-14 19:23:18 -0400
commit47b380f03e8898f4706ff01fa2be64dfb72e0dba (patch)
treefb3508758c9abd0e297afee43ac847bf5aebcbbb /src/mongo/db/dbmessage.cpp
parentb3c26131f6ab3f919beca658341e737de5d45683 (diff)
downloadmongo-47b380f03e8898f4706ff01fa2be64dfb72e0dba.tar.gz
SERVER-41071 Replace NULL and 0 with nullptr
Diffstat (limited to 'src/mongo/db/dbmessage.cpp')
-rw-r--r--src/mongo/db/dbmessage.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/dbmessage.cpp b/src/mongo/db/dbmessage.cpp
index f893b53eee9..75f2ecb8fbc 100644
--- a/src/mongo/db/dbmessage.cpp
+++ b/src/mongo/db/dbmessage.cpp
@@ -36,7 +36,7 @@
namespace mongo {
-DbMessage::DbMessage(const Message& msg) : _msg(msg), _nsStart(NULL), _mark(NULL), _nsLen(0) {
+DbMessage::DbMessage(const Message& msg) : _msg(msg), _nsStart(nullptr), _mark(nullptr), _nsLen(0) {
// for received messages, Message has only one buffer
_theEnd = _msg.singleData().data() + _msg.singleData().dataLen();
_nextjsobj = _msg.singleData().data();
@@ -89,7 +89,7 @@ const char* DbMessage::getArray(size_t count) const {
BSONObj DbMessage::nextJsObj() {
uassert(ErrorCodes::InvalidBSON,
"Client Error: Remaining data too small for BSON object",
- _nextjsobj != NULL && _theEnd - _nextjsobj >= 5);
+ _nextjsobj != nullptr && _theEnd - _nextjsobj >= 5);
if (serverGlobalParams.objcheck) {
Status status = validateBSON(
@@ -105,12 +105,12 @@ BSONObj DbMessage::nextJsObj() {
_nextjsobj += js.objsize();
if (_nextjsobj >= _theEnd)
- _nextjsobj = NULL;
+ _nextjsobj = nullptr;
return js;
}
-void DbMessage::markReset(const char* toMark = NULL) {
- if (toMark == NULL) {
+void DbMessage::markReset(const char* toMark = nullptr) {
+ if (toMark == nullptr) {
toMark = _mark;
}