summaryrefslogtreecommitdiff
path: root/src/mongo/db/concurrency
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/concurrency
parentb3c26131f6ab3f919beca658341e737de5d45683 (diff)
downloadmongo-47b380f03e8898f4706ff01fa2be64dfb72e0dba.tar.gz
SERVER-41071 Replace NULL and 0 with nullptr
Diffstat (limited to 'src/mongo/db/concurrency')
-rw-r--r--src/mongo/db/concurrency/lock_request_list.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mongo/db/concurrency/lock_request_list.h b/src/mongo/db/concurrency/lock_request_list.h
index c9009cdec4f..5423a11792f 100644
--- a/src/mongo/db/concurrency/lock_request_list.h
+++ b/src/mongo/db/concurrency/lock_request_list.h
@@ -48,10 +48,10 @@ class LockRequestList {
public:
void push_front(LockRequest* request) {
// Sanity check that we do not reuse entries without cleaning them up
- invariant(request->next == NULL);
- invariant(request->prev == NULL);
+ invariant(request->next == nullptr);
+ invariant(request->prev == nullptr);
- if (_front == NULL) {
+ if (_front == nullptr) {
_front = _back = request;
} else {
request->next = _front;
@@ -63,10 +63,10 @@ public:
void push_back(LockRequest* request) {
// Sanity check that we do not reuse entries without cleaning them up
- invariant(request->next == NULL);
- invariant(request->prev == NULL);
+ invariant(request->next == nullptr);
+ invariant(request->prev == nullptr);
- if (_front == NULL) {
+ if (_front == nullptr) {
_front = _back = request;
} else {
request->prev = _back;
@@ -77,28 +77,28 @@ public:
}
void remove(LockRequest* request) {
- if (request->prev != NULL) {
+ if (request->prev != nullptr) {
request->prev->next = request->next;
} else {
_front = request->next;
}
- if (request->next != NULL) {
+ if (request->next != nullptr) {
request->next->prev = request->prev;
} else {
_back = request->prev;
}
- request->prev = NULL;
- request->next = NULL;
+ request->prev = nullptr;
+ request->next = nullptr;
}
void reset() {
- _front = _back = NULL;
+ _front = _back = nullptr;
}
bool empty() const {
- return _front == NULL;
+ return _front == nullptr;
}
// Pointers to the beginning and the end of the list