diff options
author | costan <costan@google.com> | 2018-04-10 16:18:06 -0700 |
---|---|---|
committer | Victor Costan <pwnall@chromium.org> | 2018-04-10 16:26:43 -0700 |
commit | 09217fd0677a4fd9713c7a4d774c494a7d3c1f15 (patch) | |
tree | 7b22f6275e16b1cb5059aa726d59e8c5a357c1d5 /util/coding.cc | |
parent | 6a3b915166fce75aaf9ac209114a3ad9caa34171 (diff) | |
download | leveldb-09217fd0677a4fd9713c7a4d774c494a7d3c1f15.tar.gz |
Replace NULL with nullptr in C++ files.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192365747
Diffstat (limited to 'util/coding.cc')
-rw-r--r-- | util/coding.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/util/coding.cc b/util/coding.cc index 21e3186..9e72613 100644 --- a/util/coding.cc +++ b/util/coding.cc @@ -125,14 +125,14 @@ const char* GetVarint32PtrFallback(const char* p, return reinterpret_cast<const char*>(p); } } - return NULL; + return nullptr; } bool GetVarint32(Slice* input, uint32_t* value) { const char* p = input->data(); const char* limit = p + input->size(); const char* q = GetVarint32Ptr(p, limit, value); - if (q == NULL) { + if (q == nullptr) { return false; } else { *input = Slice(q, limit - q); @@ -154,14 +154,14 @@ const char* GetVarint64Ptr(const char* p, const char* limit, uint64_t* value) { return reinterpret_cast<const char*>(p); } } - return NULL; + return nullptr; } bool GetVarint64(Slice* input, uint64_t* value) { const char* p = input->data(); const char* limit = p + input->size(); const char* q = GetVarint64Ptr(p, limit, value); - if (q == NULL) { + if (q == nullptr) { return false; } else { *input = Slice(q, limit - q); @@ -173,8 +173,8 @@ const char* GetLengthPrefixedSlice(const char* p, const char* limit, Slice* result) { uint32_t len; p = GetVarint32Ptr(p, limit, &len); - if (p == NULL) return NULL; - if (p + len > limit) return NULL; + if (p == nullptr) return nullptr; + if (p + len > limit) return nullptr; *result = Slice(p, len); return p + len; } |