Skip to content

Commit 485b4fb

Browse files
committed
fast check for ascii
1 parent cff5374 commit 485b4fb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/jsoncons/utility/unicode_traits.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,10 +1150,10 @@ namespace unicode_traits {
11501150
conv_errc result{};
11511151
while (it != end)
11521152
{
1153-
if ((end - it) >= 8)
1153+
/*if ((end - it) >= 8)
11541154
{
1155-
while (true) JSONCONS_REPEAT8({if (JSONCONS_LIKELY((trailing_bytes_for_utf8[*it] == 0) && (*it >= 0x80 && *it < 0xC2))) ++it; else break;})
1156-
}
1155+
while (true) JSONCONS_REPEAT8({if (JSONCONS_LIKELY((trailing_bytes_for_utf8[*it] == 0) && !(*it >= 0x80 && *it < 0xC2))) ++it; else break;})
1156+
}*/
11571157
const std::size_t len = static_cast<std::size_t>(trailing_bytes_for_utf8[*it]) + 1;
11581158
if (len > (std::size_t)(end - it))
11591159
{

0 commit comments

Comments
 (0)