diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2018-08-08 17:14:42 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2018-08-08 17:14:42 -0700 |
commit | a8465b738e5a1f346ece58ea6f82612bcd6659d2 (patch) | |
tree | b755540a5d7d2cc988eabc7ac594e6abd9da29d1 /src/google/protobuf/stubs/stl_util.h | |
parent | 6bbe197e9c1b6fc38cbdc45e3bf83fa7ced792a3 (diff) | |
parent | 9bbc4b1fab8262958c172f2d8e87b486c950a051 (diff) | |
download | protobuf-a8465b738e5a1f346ece58ea6f82612bcd6659d2.tar.gz protobuf-a8465b738e5a1f346ece58ea6f82612bcd6659d2.tar.bz2 protobuf-a8465b738e5a1f346ece58ea6f82612bcd6659d2.zip |
Merge master branch.
Diffstat (limited to 'src/google/protobuf/stubs/stl_util.h')
-rw-r--r-- | src/google/protobuf/stubs/stl_util.h | 6 |
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) { |