Index: third_party/re2/util/rune.cc |
diff --git a/third_party/re2/util/rune.cc b/third_party/re2/util/rune.cc |
index e6231ce5a8ee04797a689ee01e07d241940223cd..26442b0ad3d8426d70394250fa5d06951da18d4a 100644 |
--- a/third_party/re2/util/rune.cc |
+++ b/third_party/re2/util/rune.cc |
@@ -133,7 +133,7 @@ |
*/ |
c = *rune; |
if(c <= Rune1) { |
- str[0] = static_cast<char>(c); |
+ str[0] = c; |
return 1; |
} |
@@ -142,7 +142,7 @@ |
* 0080-07FF => T2 Tx |
*/ |
if(c <= Rune2) { |
- str[0] = T2 | static_cast<char>(c >> 1*Bitx); |
+ str[0] = T2 | (c >> 1*Bitx); |
str[1] = Tx | (c & Maskx); |
return 2; |
} |
@@ -161,9 +161,9 @@ |
* 0800-FFFF => T3 Tx Tx |
*/ |
if (c <= Rune3) { |
- str[0] = T3 | static_cast<char>(c >> 2*Bitx); |
+ str[0] = T3 | (c >> 2*Bitx); |
str[1] = Tx | ((c >> 1*Bitx) & Maskx); |
- str[2] = Tx | (c & Maskx); |
+ str[2] = Tx | (c & Maskx); |
return 3; |
} |
@@ -171,7 +171,7 @@ |
* four character sequence (21-bit value) |
* 10000-1FFFFF => T4 Tx Tx Tx |
*/ |
- str[0] = T4 | static_cast<char>(c >> 3*Bitx); |
+ str[0] = T4 | (c >> 3*Bitx); |
str[1] = Tx | ((c >> 2*Bitx) & Maskx); |
str[2] = Tx | ((c >> 1*Bitx) & Maskx); |
str[3] = Tx | (c & Maskx); |