mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Codemod NULL to nullptr
Summary: scripted NULL to nullptr in * include/leveldb/ * db/ * table/ * util/ Test Plan: make all check Reviewers: dhruba, emayanke Reviewed By: emayanke CC: leveldb Differential Revision: https://reviews.facebook.net/D9003
This commit is contained in:
@@ -7,14 +7,14 @@
|
||||
namespace leveldb {
|
||||
|
||||
Iterator::Iterator() {
|
||||
cleanup_.function = NULL;
|
||||
cleanup_.next = NULL;
|
||||
cleanup_.function = nullptr;
|
||||
cleanup_.next = nullptr;
|
||||
}
|
||||
|
||||
Iterator::~Iterator() {
|
||||
if (cleanup_.function != NULL) {
|
||||
if (cleanup_.function != nullptr) {
|
||||
(*cleanup_.function)(cleanup_.arg1, cleanup_.arg2);
|
||||
for (Cleanup* c = cleanup_.next; c != NULL; ) {
|
||||
for (Cleanup* c = cleanup_.next; c != nullptr; ) {
|
||||
(*c->function)(c->arg1, c->arg2);
|
||||
Cleanup* next = c->next;
|
||||
delete c;
|
||||
@@ -24,9 +24,9 @@ Iterator::~Iterator() {
|
||||
}
|
||||
|
||||
void Iterator::RegisterCleanup(CleanupFunction func, void* arg1, void* arg2) {
|
||||
assert(func != NULL);
|
||||
assert(func != nullptr);
|
||||
Cleanup* c;
|
||||
if (cleanup_.function == NULL) {
|
||||
if (cleanup_.function == nullptr) {
|
||||
c = &cleanup_;
|
||||
} else {
|
||||
c = new Cleanup;
|
||||
@@ -41,7 +41,7 @@ void Iterator::RegisterCleanup(CleanupFunction func, void* arg1, void* arg2) {
|
||||
namespace {
|
||||
class EmptyIterator : public Iterator {
|
||||
public:
|
||||
EmptyIterator(const Status& s) : status_(s) { }
|
||||
explicit EmptyIterator(const Status& s) : status_(s) { }
|
||||
virtual bool Valid() const { return false; }
|
||||
virtual void Seek(const Slice& target) { }
|
||||
virtual void SeekToFirst() { }
|
||||
|
||||
Reference in New Issue
Block a user