Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Unified Diff: webrtc/base/stringencode.cc

Issue 2718663005: Replace NULL with nullptr or null in webrtc/base/. (Closed)
Patch Set: Fixing Windows and formatting issues. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/stream_unittest.cc ('k') | webrtc/base/stringencode_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/stringencode.cc
diff --git a/webrtc/base/stringencode.cc b/webrtc/base/stringencode.cc
index 7c11a05e3e916c5a9c1015a0208448182bb01286..c7d206fd9329724071095ec675681e98df65d271 100644
--- a/webrtc/base/stringencode.cc
+++ b/webrtc/base/stringencode.cc
@@ -141,7 +141,7 @@ const unsigned char ASCII_CLASS[128] = {
size_t url_encode(char * buffer, size_t buflen,
const char * source, size_t srclen) {
- if (NULL == buffer)
+ if (nullptr == buffer)
return srclen * 3 + 1;
if (buflen <= 0)
return 0;
@@ -167,7 +167,7 @@ size_t url_encode(char * buffer, size_t buflen,
size_t url_decode(char * buffer, size_t buflen,
const char * source, size_t srclen) {
- if (NULL == buffer)
+ if (nullptr == buffer)
return srclen + 1;
if (buflen <= 0)
return 0;
@@ -546,7 +546,7 @@ size_t transform(std::string& value, size_t maxlen, const std::string& source,
std::string s_transform(const std::string& source, Transform t) {
// Ask transformation function to approximate the destination size (returns upper bound)
- size_t maxlen = t(NULL, 0, source.data(), source.length());
+ size_t maxlen = t(nullptr, 0, source.data(), source.length());
char * buffer = STACK_ARRAY(char, maxlen);
size_t len = t(buffer, maxlen, source.data(), source.length());
std::string result(buffer, len);
« no previous file with comments | « webrtc/base/stream_unittest.cc ('k') | webrtc/base/stringencode_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698