Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Unified Diff: src/parsing/scanner.h

Issue 2493553002: Fix -Wsign-compare warnings in parser, scanner, regexp, runtime. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/libsampler/sampler.cc ('k') | src/regexp/regexp-parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/scanner.h
diff --git a/src/parsing/scanner.h b/src/parsing/scanner.h
index b2b1a8a3f48a348b5fb8c44591d571749a0ac98f..e2296554248ea4ba28f28a90fcb2cbe17b2b3b66 100644
--- a/src/parsing/scanner.h
+++ b/src/parsing/scanner.h
@@ -369,14 +369,15 @@ class Scanner {
INLINE(void AddChar(uc32 code_unit)) {
if (position_ >= backing_store_.length()) ExpandBuffer();
if (is_one_byte_) {
- if (code_unit <= unibrow::Latin1::kMaxChar) {
+ if (code_unit <= static_cast<uc32>(unibrow::Latin1::kMaxChar)) {
backing_store_[position_] = static_cast<byte>(code_unit);
position_ += kOneByteSize;
return;
}
ConvertToTwoByte();
}
- if (code_unit <= unibrow::Utf16::kMaxNonSurrogateCharCode) {
+ if (code_unit <=
+ static_cast<uc32>(unibrow::Utf16::kMaxNonSurrogateCharCode)) {
*reinterpret_cast<uint16_t*>(&backing_store_[position_]) = code_unit;
position_ += kUC16Size;
} else {
« no previous file with comments | « src/libsampler/sampler.cc ('k') | src/regexp/regexp-parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698