diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2017-11-27 11:19:11 +0300 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2017-12-01 09:45:00 +0300 |
commit | e32bbbf4d7adfdb22822c39991ea0e972a0a3453 (patch) | |
tree | f2da83e4c0047e757c52cfc5de1f0c49fce922fb /src/node_i18n.cc | |
parent | 85e34b0c73794d3a241aa9e0c6139292f445c30a (diff) |
src: use nullptr instead of NULL
PR-URL: https://github.com/nodejs/node/pull/17373
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'src/node_i18n.cc')
-rw-r--r-- | src/node_i18n.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/node_i18n.cc b/src/node_i18n.cc index 101ae4c79e4..041eda94f3b 100644 --- a/src/node_i18n.cc +++ b/src/node_i18n.cc @@ -114,21 +114,21 @@ MaybeLocal<Object> ToBufferEndian(Environment* env, MaybeStackBuffer<T>* buf) { } struct Converter { - explicit Converter(const char* name, const char* sub = NULL) + explicit Converter(const char* name, const char* sub = nullptr) : conv(nullptr) { UErrorCode status = U_ZERO_ERROR; conv = ucnv_open(name, &status); CHECK(U_SUCCESS(status)); - if (sub != NULL) { + if (sub != nullptr) { ucnv_setSubstChars(conv, sub, strlen(sub), &status); } } explicit Converter(UConverter* converter, - const char* sub = NULL) : conv(converter) { + const char* sub = nullptr) : conv(converter) { CHECK_NE(conv, nullptr); UErrorCode status = U_ZERO_ERROR; - if (sub != NULL) { + if (sub != nullptr) { ucnv_setSubstChars(conv, sub, strlen(sub), &status); } } @@ -229,7 +229,7 @@ class ConverterObject : public BaseObject, Converter { ucnv_toUnicode(converter->conv, &target, target + (limit * sizeof(UChar)), &source, source + source_length, - NULL, flush, &status); + nullptr, flush, &status); if (U_SUCCESS(status)) { if (limit > 0) @@ -254,7 +254,7 @@ class ConverterObject : public BaseObject, Converter { v8::Local<v8::Object> wrap, UConverter* converter, bool ignoreBOM, - const char* sub = NULL) : + const char* sub = nullptr) : BaseObject(env, wrap), Converter(converter, sub), ignoreBOM_(ignoreBOM) { @@ -427,7 +427,7 @@ const char* EncodingName(const enum encoding encoding) { case LATIN1: return "iso8859-1"; case UCS2: return "utf16le"; case UTF8: return "utf-8"; - default: return NULL; + default: return nullptr; } } |