aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/stubs/stl_util.h
diff options
context:
space:
mode:
authorAdam Cozzette <acozzette@gmail.com>2018-08-07 12:05:29 -0700
committerGitHub <noreply@github.com>2018-08-07 12:05:29 -0700
commitf504d95d461319ad9fc11e0925569b84a4c65d7d (patch)
tree0d30b048b4176ec9aa7d3b14a60925cb74c6cc2b /src/google/protobuf/stubs/stl_util.h
parent3389bd965b1fb6687056d81b069e99f8c2543cba (diff)
parent526b350199e604b62daaee9febc5d8a8d593a010 (diff)
downloadprotobuf-f504d95d461319ad9fc11e0925569b84a4c65d7d.tar.gz
protobuf-f504d95d461319ad9fc11e0925569b84a4c65d7d.tar.bz2
protobuf-f504d95d461319ad9fc11e0925569b84a4c65d7d.zip
Merge pull request #5010 from batradhruv/4593
#4593 Replace all occurrences of "NULL" to nullptr in src/google/proto…
Diffstat (limited to 'src/google/protobuf/stubs/stl_util.h')
-rw-r--r--src/google/protobuf/stubs/stl_util.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/google/protobuf/stubs/stl_util.h b/src/google/protobuf/stubs/stl_util.h
index 9e4c82a4..2c265e92 100644
--- a/src/google/protobuf/stubs/stl_util.h
+++ b/src/google/protobuf/stubs/stl_util.h
@@ -82,7 +82,7 @@ inline void STLStringResizeUninitialized(string* s, size_t new_size) {
// already work on all current implementations.
inline char* string_as_array(string* str) {
// DO NOT USE const_cast<char*>(str->data())! See the unittest for why.
- return str->empty() ? NULL : &*str->begin();
+ return str->empty() ? nullptr : &*str->begin();
}
// STLDeleteElements() deletes all the elements in an STL container and clears
@@ -90,7 +90,7 @@ inline char* string_as_array(string* str) {
// hash_set, or any other STL container which defines sensible begin(), end(),
// and clear() methods.
//
-// If container is NULL, this function is a no-op.
+// If container is nullptr, this function is a no-op.
//
// As an alternative to calling STLDeleteElements() directly, consider
// ElementDeleter (defined below), which ensures that your container's elements
@@ -104,7 +104,7 @@ void STLDeleteElements(T *container) {
// Given an STL container consisting of (key, value) pairs, STLDeleteValues
// deletes all the "value" components and clears the container. Does nothing
-// in the case it's given a NULL pointer.
+// in the case it's given a null pointer.
template <class T>
void STLDeleteValues(T *v) {