diff options
| author | Yi Kong <yikong@google.com> | 2018-07-16 18:11:34 -0700 |
|---|---|---|
| committer | Yi Kong <yikong@google.com> | 2018-07-16 18:11:34 -0700 |
| commit | e1731a4f2e05f1abb4a45602067708851eaf1e14 (patch) | |
| tree | 339c0ce3d3de7d6f5e0fb9bdada9b6210d1d470f /libutils/String16.cpp | |
| parent | 895acebe946e34d2626716c5c4d7d7f2cc28c39d (diff) | |
| download | system_core-e1731a4f2e05f1abb4a45602067708851eaf1e14.tar.gz system_core-e1731a4f2e05f1abb4a45602067708851eaf1e14.tar.bz2 system_core-e1731a4f2e05f1abb4a45602067708851eaf1e14.zip | |
[libutils] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.
Test: m
Bug: 68236239
Change-Id: I5e89ec8c42151875439d2656475a8739ab9cb7dc
Diffstat (limited to 'libutils/String16.cpp')
| -rw-r--r-- | libutils/String16.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libutils/String16.cpp b/libutils/String16.cpp index 84d53dd76..f820b8b89 100644 --- a/libutils/String16.cpp +++ b/libutils/String16.cpp @@ -74,7 +74,7 @@ String16::String16() } String16::String16(StaticLinkage) - : mString(0) + : mString(nullptr) { // this constructor is used when we can't rely on the static-initializers // having run. In this case we always allocate an empty string. It's less @@ -336,7 +336,7 @@ status_t String16::makeLower() { const size_t N = size(); const char16_t* str = string(); - char16_t* edit = NULL; + char16_t* edit = nullptr; for (size_t i=0; i<N; i++) { const char16_t v = str[i]; if (v >= 'A' && v <= 'Z') { @@ -358,7 +358,7 @@ status_t String16::replaceAll(char16_t replaceThis, char16_t withThis) { const size_t N = size(); const char16_t* str = string(); - char16_t* edit = NULL; + char16_t* edit = nullptr; for (size_t i=0; i<N; i++) { if (str[i] == replaceThis) { if (!edit) { |
