diff options
Diffstat (limited to 'graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/core.h')
-rw-r--r-- | graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/core.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/core.h b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/core.h index de6199f2a3..d237e77a07 100644 --- a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/core.h +++ b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/core.h @@ -133,15 +133,15 @@ namespace internal inline bool is_overlong_sequence(uint32_t cp, octet_difference_type length) { if (cp < 0x80) { - if (length != 1) + if (length != 1) return true; } else if (cp < 0x800) { - if (length != 2) + if (length != 2) return true; } else if (cp < 0x10000) { - if (length != 3) + if (length != 3) return true; } @@ -163,7 +163,7 @@ namespace internal return UTF8_OK; } - #define UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(IT, END) {utf_error ret = increase_safely(IT, END); if (ret != UTF8_OK) return ret;} + #define UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(IT, END) {utf_error ret = increase_safely(IT, END); if (ret != UTF8_OK) return ret;} /// get_sequence_x functions decode utf-8 sequences of the length x template <typename octet_iterator> @@ -180,7 +180,7 @@ namespace internal template <typename octet_iterator> utf_error get_sequence_2(octet_iterator& it, octet_iterator end, uint32_t& code_point) { - if (it == end) + if (it == end) return NOT_ENOUGH_ROOM; code_point = utf8::internal::mask8(*it); @@ -197,7 +197,7 @@ namespace internal { if (it == end) return NOT_ENOUGH_ROOM; - + code_point = utf8::internal::mask8(*it); UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) @@ -282,7 +282,7 @@ namespace internal else err = OVERLONG_SEQUENCE; } - else + else err = INVALID_CODE_POINT; } @@ -330,7 +330,7 @@ namespace internal ((it != end) && (utf8::internal::mask8(*it++)) == bom[1]) && ((it != end) && (utf8::internal::mask8(*it)) == bom[2]) ); - } + } } // namespace utf8 #endif // header guard |