From 2d82cdf670d88f2f5acc7d1b759cf0cbb3f99962 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 22 Oct 2014 03:29:32 +0200 Subject: 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`. --- src/fs_event_wrap.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fs_event_wrap.cc') diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index 06e5ef44d9..8f381b40a7 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -175,7 +175,7 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename, Null(env->isolate()) }; - if (filename != NULL) { + if (filename != nullptr) { argv[2] = OneByteString(env->isolate(), filename); } @@ -186,7 +186,7 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename, void FSEventWrap::Close(const FunctionCallbackInfo& args) { FSEventWrap* wrap = Unwrap(args.Holder()); - if (wrap == NULL || wrap->initialized_ == false) + if (wrap == nullptr || wrap->initialized_ == false) return; wrap->initialized_ = false; -- cgit v1.2.3