diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-10-22 03:29:32 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2014-10-23 22:49:58 +0200 |
commit | 2d82cdf670d88f2f5acc7d1b759cf0cbb3f99962 (patch) | |
tree | a6957d0fa3f6cc76e100ae279e389447b5055029 /src/string_bytes.h | |
parent | b2b59febe8bf1d411e7d8faacd23789784aac1f0 (diff) | |
download | node-new-2d82cdf670d88f2f5acc7d1b759cf0cbb3f99962.tar.gz |
src: replace NULL with nullptr
Now that we are building with C++11 features enabled, replace use
of NULL with nullptr.
The benefit of using nullptr is that it can never be confused for
an integral type because it does not support implicit conversions
to integral types except boolean - unlike NULL, which is defined
as a literal `0`.
Diffstat (limited to 'src/string_bytes.h')
-rw-r--r-- | src/string_bytes.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string_bytes.h b/src/string_bytes.h index 77ae5b9421..10fee30913 100644 --- a/src/string_bytes.h +++ b/src/string_bytes.h @@ -68,7 +68,7 @@ class StringBytes { size_t buflen, v8::Handle<v8::Value> val, enum encoding enc, - int* chars_written = NULL); + int* chars_written = nullptr); // Take the bytes in the src, and turn it into a Buffer or String. static v8::Local<v8::Value> Encode(v8::Isolate* isolate, @@ -109,7 +109,7 @@ class StringBytes { size_t buflen, v8::Handle<v8::Value> val, enum encoding enc, - int* chars_written = NULL) { + int* chars_written = nullptr) { v8::Isolate* isolate = v8::Isolate::GetCurrent(); return Write(isolate, buf, buflen, val, enc, chars_written); }) |