diff options
author | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2019-06-14 16:42:10 -0400 |
---|---|---|
committer | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2019-06-14 19:23:18 -0400 |
commit | 47b380f03e8898f4706ff01fa2be64dfb72e0dba (patch) | |
tree | fb3508758c9abd0e297afee43ac847bf5aebcbbb /src/mongo/util/concurrency | |
parent | b3c26131f6ab3f919beca658341e737de5d45683 (diff) | |
download | mongo-47b380f03e8898f4706ff01fa2be64dfb72e0dba.tar.gz |
SERVER-41071 Replace NULL and 0 with nullptr
Diffstat (limited to 'src/mongo/util/concurrency')
-rw-r--r-- | src/mongo/util/concurrency/mutex.h | 2 | ||||
-rw-r--r-- | src/mongo/util/concurrency/ticketholder.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/util/concurrency/mutex.h b/src/mongo/util/concurrency/mutex.h index 8674fe269a4..30ee48f8a30 100644 --- a/src/mongo/util/concurrency/mutex.h +++ b/src/mongo/util/concurrency/mutex.h @@ -79,7 +79,7 @@ class SimpleMutex { public: SimpleMutex() { - verify(pthread_mutex_init(&_lock, 0) == 0); + verify(pthread_mutex_init(&_lock, nullptr) == 0); } ~SimpleMutex() { diff --git a/src/mongo/util/concurrency/ticketholder.h b/src/mongo/util/concurrency/ticketholder.h index 51c232bc5d1..8ab3d4a39d9 100644 --- a/src/mongo/util/concurrency/ticketholder.h +++ b/src/mongo/util/concurrency/ticketholder.h @@ -118,7 +118,7 @@ class TicketHolderReleaser { public: TicketHolderReleaser() { - _holder = NULL; + _holder = nullptr; } explicit TicketHolderReleaser(TicketHolder* holder) { @@ -132,10 +132,10 @@ public: } bool hasTicket() const { - return _holder != NULL; + return _holder != nullptr; } - void reset(TicketHolder* holder = NULL) { + void reset(TicketHolder* holder = nullptr) { if (_holder) { _holder->release(); } |