| Index: runtime/vm/unicode.h
|
| diff --git a/runtime/vm/unicode.h b/runtime/vm/unicode.h
|
| index e06f1f933f66ff333744d773456aa7d310a05937..7ea10e970b9c88884624995f1819eaf479a5a4d4 100644
|
| --- a/runtime/vm/unicode.h
|
| +++ b/runtime/vm/unicode.h
|
| @@ -117,17 +117,17 @@ class Utf16 : AllStatic {
|
| }
|
|
|
| // Returns true if ch is a lead or trail surrogate.
|
| - static bool IsSurrogate(int32_t ch) {
|
| + static bool IsSurrogate(uint32_t ch) {
|
| return (ch & 0xFFFFF800) == 0xD800;
|
| }
|
|
|
| // Returns true if ch is a lead surrogate.
|
| - static bool IsLeadSurrogate(int32_t ch) {
|
| + static bool IsLeadSurrogate(uint32_t ch) {
|
| return (ch & 0xFFFFFC00) == 0xD800;
|
| }
|
|
|
| // Returns true if ch is a low surrogate.
|
| - static bool IsTrailSurrogate(int32_t ch) {
|
| + static bool IsTrailSurrogate(uint32_t ch) {
|
| return (ch & 0xFFFFFC00) == 0xDC00;
|
| }
|
|
|
| @@ -147,8 +147,8 @@ class Utf16 : AllStatic {
|
| }
|
|
|
| // Decodes a surrogate pair into a supplementary code point.
|
| - static int32_t Decode(int32_t lead, int32_t trail) {
|
| - return 0x10000 + ((lead & 0x3FF) << 10) + (trail & 0x3FF);
|
| + static int32_t Decode(uint16_t lead, uint16_t trail) {
|
| + return 0x10000 + ((lead & 0x000003FF) << 10) + (trail & 0x3FF);
|
| }
|
|
|
| // Encodes a single code point.
|
|
|