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_watchdog.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_watchdog.cc')
-rw-r--r-- | src/node_watchdog.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node_watchdog.cc b/src/node_watchdog.cc index 65e7b27234..147cc10b9e 100644 --- a/src/node_watchdog.cc +++ b/src/node_watchdog.cc @@ -69,7 +69,7 @@ void Watchdog::Destroy() { uv_async_send(&async_); uv_thread_join(&thread_); - uv_close(reinterpret_cast<uv_handle_t*>(&async_), NULL); + uv_close(reinterpret_cast<uv_handle_t*>(&async_), nullptr); // UV_RUN_DEFAULT so that libuv has a chance to clean up. uv_run(loop_, UV_RUN_DEFAULT); @@ -77,7 +77,7 @@ void Watchdog::Destroy() { int rc = uv_loop_close(loop_); CHECK_EQ(0, rc); delete loop_; - loop_ = NULL; + loop_ = nullptr; destroyed_ = true; } @@ -91,7 +91,7 @@ void Watchdog::Run(void* arg) { // Loop ref count reaches zero when both handles are closed. // Close the timer handle on this side and let Destroy() close async_ - uv_close(reinterpret_cast<uv_handle_t*>(&wd->timer_), NULL); + uv_close(reinterpret_cast<uv_handle_t*>(&wd->timer_), nullptr); } |