Commit 09ab629d authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[cleanup] Replace 0 and NULL with nullptr for objects files.

Fixing clang-tidy warning.

Bug: v8:8015
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ie05d919cfd5cc4447c00603c8a46e975ad85cce3
Reviewed-on: https://chromium-review.googlesource.com/1224378Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55901}
parent 2d6e0be1
......@@ -11018,15 +11018,13 @@ FlatStringReader::FlatStringReader(Isolate* isolate, Handle<String> str)
PostGarbageCollection();
}
FlatStringReader::FlatStringReader(Isolate* isolate, Vector<const char> input)
: Relocatable(isolate),
str_(0),
str_(nullptr),
is_one_byte_(true),
length_(input.length()),
start_(input.start()) {}
void FlatStringReader::PostGarbageCollection() {
if (str_ == nullptr) return;
Handle<String> str(str_);
......
......@@ -164,7 +164,7 @@ bool Intl::RemoveLocaleScriptTag(const std::string& icu_locale,
std::string* locale_less_script) {
icu::Locale new_locale = icu::Locale::createCanonical(icu_locale.c_str());
const char* icu_script = new_locale.getScript();
if (icu_script == NULL || strlen(icu_script) == 0) {
if (icu_script == nullptr || strlen(icu_script) == 0) {
*locale_less_script = std::string();
return false;
}
......
......@@ -174,7 +174,7 @@ Handle<JSObject> JSCollator::ResolvedOptions(Isolate* isolate,
// The spec forbids the search as a collation value in the
// locale tag, so let's filter it out.
status = U_ZERO_ERROR;
new_icu_locale.setKeywordValue(legacy_collation_key, NULL, status);
new_icu_locale.setKeywordValue(legacy_collation_key, nullptr, status);
CHECK(U_SUCCESS(status));
toLanguageTag(new_icu_locale, bcp47_locale_tag);
......@@ -357,7 +357,7 @@ MaybeHandle<JSCollator> JSCollator::InitializeCollator(
if ((value == "search") || (value == "standard")) {
UErrorCode status = U_ZERO_ERROR;
const char* key = uloc_toLegacyKey("co");
icu_locale.setKeywordValue(key, NULL, status);
icu_locale.setKeywordValue(key, nullptr, status);
CHECK(U_SUCCESS(status));
}
}
......
......@@ -261,7 +261,7 @@ MaybeHandle<JSNumberFormat> JSNumberFormat::Initialize(
if (value == "native" || value == "traditio" || value == "finance") {
// 10. Set numberFormat.[[NumberingSystem]] to r.[[nu]].
UErrorCode status = U_ZERO_ERROR;
icu_locale.setKeywordValue("nu", NULL, status);
icu_locale.setKeywordValue("nu", nullptr, status);
CHECK(U_SUCCESS(status));
}
}
......
......@@ -300,11 +300,11 @@ class String : public Name {
// do any heap allocations. This is useful when printing stack traces.
std::unique_ptr<char[]> ToCString(AllowNullsFlag allow_nulls,
RobustnessFlag robustness_flag, int offset,
int length, int* length_output = 0);
int length, int* length_output = nullptr);
std::unique_ptr<char[]> ToCString(
AllowNullsFlag allow_nulls = DISALLOW_NULLS,
RobustnessFlag robustness_flag = FAST_STRING_TRAVERSAL,
int* length_output = 0);
int* length_output = nullptr);
bool ComputeArrayIndex(uint32_t* index);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment