summaryrefslogtreecommitdiff
path: root/src/node_crypto_bio.h
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-10-22 03:29:32 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2014-10-23 22:49:58 +0200
commit2d82cdf670d88f2f5acc7d1b759cf0cbb3f99962 (patch)
treea6957d0fa3f6cc76e100ae279e389447b5055029 /src/node_crypto_bio.h
parentb2b59febe8bf1d411e7d8faacd23789784aac1f0 (diff)
downloadandroid-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_crypto_bio.h')
-rw-r--r--src/node_crypto_bio.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node_crypto_bio.h b/src/node_crypto_bio.h
index 1f5657fbf1..bac79bab0b 100644
--- a/src/node_crypto_bio.h
+++ b/src/node_crypto_bio.h
@@ -32,8 +32,8 @@ class NodeBIO {
public:
NodeBIO() : initial_(kInitialBufferLength),
length_(0),
- read_head_(NULL),
- write_head_(NULL) {
+ read_head_(nullptr),
+ write_head_(nullptr) {
}
~NodeBIO();
@@ -89,7 +89,7 @@ class NodeBIO {
}
static inline NodeBIO* FromBIO(BIO* bio) {
- CHECK_NE(bio->ptr, NULL);
+ CHECK_NE(bio->ptr, nullptr);
return static_cast<NodeBIO*>(bio->ptr);
}
@@ -113,7 +113,7 @@ class NodeBIO {
explicit Buffer(size_t len) : read_pos_(0),
write_pos_(0),
len_(len),
- next_(NULL) {
+ next_(nullptr) {
data_ = new char[len];
}