[clang-tidy] Prefer static_cast to c style casts
See https://clang.llvm.org/extra/clang-tidy/checks/google-readability-casting.html and https://google.github.io/styleguide/cppguide.html#Casting. Change-Id: Ib5a3bb8873bc6d050c4d0abe36a3ae813bbd448a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2233987 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Zhi An Ng <zhin@chromium.org> Cr-Commit-Position: refs/heads/master@{#68301}
This commit is contained in:
parent
ab84c50219
commit
f36463331b
@ -775,7 +775,7 @@ static int GetCaseIndependentLetters(Isolate* isolate, uc16 character,
|
||||
if (in_special_add_set && RegExpCaseFolding::Canonicalize(cu) != canon) {
|
||||
continue;
|
||||
}
|
||||
letters[items++] = (unibrow::uchar)(cu);
|
||||
letters[items++] = static_cast<unibrow::uchar>(cu);
|
||||
}
|
||||
}
|
||||
DCHECK(ContainsOnlyUtf16CodeUnits(letters, items));
|
||||
|
@ -67,7 +67,7 @@ int RegExpMacroAssembler::CaseInsensitiveCompareUnicode(Address byte_offset1,
|
||||
DCHECK_EQ(0, byte_length % 2);
|
||||
|
||||
#ifdef V8_INTL_SUPPORT
|
||||
int32_t length = (int32_t)(byte_length >> 1);
|
||||
int32_t length = static_cast<int32_t>(byte_length >> 1);
|
||||
icu::UnicodeString uni_str_1(reinterpret_cast<const char16_t*>(byte_offset1),
|
||||
length);
|
||||
return uni_str_1.caseCompare(reinterpret_cast<const char16_t*>(byte_offset2),
|
||||
|
Loading…
Reference in New Issue
Block a user