Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 1e68428

Browse files
author
Aaron Leung
committed
change the binary literals to hex literals so that it can compile without special flags or GCC
1 parent 63930f8 commit 1e68428

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

utf8_string.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ namespace Sass {
3030
++len;
3131
++i;
3232
}
33-
// it's a multi bit sequence and presumably it's a leading bit
33+
// it's a multi byte sequence and presumably it's a leading byte
3434
else {
3535
++i; // go to the next byte
3636
// see if it's still part of the sequence
37-
while ((i < end) && ((static_cast<unsigned char>(str[i]) & 0b11000000) == 0b10000000)) {
37+
while ((i < end) && ((static_cast<unsigned char>(str[i]) & 0xC0) == 0x80)) {
3838
++i;
3939
}
40-
// when it's not [aka a new leading bit], increment and move on
40+
// when it's not [aka a new leading byte], increment and move on
4141
++len;
4242
}
4343
}
@@ -60,14 +60,14 @@ namespace Sass {
6060
++len;
6161
++i;
6262
}
63-
// it's a multi bit sequence and presumably it's a leading bit
63+
// it's a multi byte sequence and presumably it's a leading byte
6464
else {
6565
++i; // go to the next byte
6666
// see if it's still part of the sequence
6767
while ((i < str.length()) && ((static_cast<unsigned char>(str[i]) & 0b11000000) == 0b10000000)) {
6868
++i;
6969
}
70-
// when it's not [aka a new leading bit], increment and move on
70+
// when it's not [aka a new leading byte], increment and move on
7171
++len;
7272
}
7373
}

0 commit comments

Comments
 (0)