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/tty_wrap.cc | |
parent | b2b59febe8bf1d411e7d8faacd23789784aac1f0 (diff) | |
download | android-node-v8-2d82cdf670d88f2f5acc7d1b759cf0cbb3f99962.tar.gz android-node-v8-2d82cdf670d88f2f5acc7d1b759cf0cbb3f99962.tar.bz2 android-node-v8-2d82cdf670d88f2f5acc7d1b759cf0cbb3f99962.zip |
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/tty_wrap.cc')
-rw-r--r-- | src/tty_wrap.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tty_wrap.cc b/src/tty_wrap.cc index 1e5eff3a67..cf1c72c646 100644 --- a/src/tty_wrap.cc +++ b/src/tty_wrap.cc @@ -60,7 +60,7 @@ void TTYWrap::Initialize(Handle<Object> target, static_cast<PropertyAttribute>(v8::ReadOnly | v8::DontDelete); t->InstanceTemplate()->SetAccessor(env->fd_string(), StreamWrap::GetFD, - NULL, + nullptr, Handle<Value>(), v8::DEFAULT, attributes); @@ -99,7 +99,7 @@ void TTYWrap::GuessHandleType(const FunctionCallbackInfo<Value>& args) { CHECK_GE(fd, 0); uv_handle_type t = uv_guess_handle(fd); - const char* type = NULL; + const char* type = nullptr; switch (t) { case UV_TCP: type = "TCP"; break; |