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/node_dtrace.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/node_dtrace.cc')
-rw-r--r-- | src/node_dtrace.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc index 2d8d32fc53..7fb2312c9a 100644 --- a/src/node_dtrace.cc +++ b/src/node_dtrace.cc @@ -78,7 +78,7 @@ using v8::Value; } \ node::Utf8Value _##member(obj->Get(OneByteString(env->isolate(), \ #member))); \ - if ((*(const char **)valp = *_##member) == NULL) \ + if ((*(const char **)valp = *_##member) == nullptr) \ *(const char **)valp = "<unknown>"; #define SLURP_INT(obj, member, valp) \ @@ -217,7 +217,7 @@ void DTRACE_HTTP_SERVER_REQUEST(const FunctionCallbackInfo<Value>& args) { Local<Value> strfwdfor = headers->Get(env->x_forwarded_string()); node::Utf8Value fwdfor(strfwdfor); - if (!strfwdfor->IsString() || (req.forwardedFor = *fwdfor) == NULL) + if (!strfwdfor->IsString() || (req.forwardedFor = *fwdfor) == nullptr) req.forwardedFor = const_cast<char*>(""); SLURP_CONNECTION(args[1], conn); |