From 538e6d6e7c75b7cca5470604811205f9dbd55c03 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 8 Jun 2023 03:01:59 +0000 Subject: CTAN sync 202306080301 --- .../LspCpp/third_party/utfcpp/source/utf8/unchecked.h | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/unchecked.h') diff --git a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/unchecked.h b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/unchecked.h index 8bc34e8f65..7151a35b67 100644 --- a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/unchecked.h +++ b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/unchecked.h @@ -37,24 +37,7 @@ namespace utf8 template octet_iterator append(uint32_t cp, octet_iterator result) { - if (cp < 0x80) // one octet - *(result++) = static_cast(cp); - else if (cp < 0x800) { // two octets - *(result++) = static_cast((cp >> 6) | 0xc0); - *(result++) = static_cast((cp & 0x3f) | 0x80); - } - else if (cp < 0x10000) { // three octets - *(result++) = static_cast((cp >> 12) | 0xe0); - *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); - *(result++) = static_cast((cp & 0x3f) | 0x80); - } - else { // four octets - *(result++) = static_cast((cp >> 18) | 0xf0); - *(result++) = static_cast(((cp >> 12) & 0x3f)| 0x80); - *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); - *(result++) = static_cast((cp & 0x3f) | 0x80); - } - return result; + return internal::append(cp, result); } template -- cgit v1.2.3