diff options
Diffstat (limited to 'graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8')
4 files changed, 19 insertions, 19 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 diff --git a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp11.h b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp11.h index d93961b04f..77771ff8e1 100644 --- a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp11.h +++ b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp11.h @@ -96,7 +96,7 @@ namespace utf8 { return starts_with_bom(s.begin(), s.end()); } - + } // namespace utf8 #endif // header guard diff --git a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp17.h b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp17.h index 7bfa869942..0205f12796 100644 --- a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp17.h +++ b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/cpp17.h @@ -96,7 +96,7 @@ namespace utf8 { return starts_with_bom(s.begin(), s.end()); } - + } // namespace utf8 #endif // header guard 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 0e1b51cc7d..8bc34e8f65 100644 --- a/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/unchecked.h +++ b/graphics/asymptote/LspCpp/third_party/utfcpp/source/utf8/unchecked.h @@ -110,18 +110,18 @@ namespace utf8 cp = ((cp << 6) & 0x7ff) + ((*it) & 0x3f); break; case 3: - ++it; + ++it; cp = ((cp << 12) & 0xffff) + ((utf8::internal::mask8(*it) << 6) & 0xfff); ++it; cp += (*it) & 0x3f; break; case 4: ++it; - cp = ((cp << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff); + cp = ((cp << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff); ++it; cp += (utf8::internal::mask8(*it) << 6) & 0xfff; ++it; - cp += (*it) & 0x3f; + cp += (*it) & 0x3f; break; } ++it; @@ -162,7 +162,7 @@ namespace utf8 distance (octet_iterator first, octet_iterator last) { typename std::iterator_traits<octet_iterator>::difference_type dist; - for (dist = 0; first < last; ++dist) + for (dist = 0; first < last; ++dist) utf8::unchecked::next(first); return dist; } @@ -234,15 +234,15 @@ namespace utf8 octet_iterator temp = it; return utf8::unchecked::next(temp); } - bool operator == (const iterator& rhs) const - { + bool operator == (const iterator& rhs) const + { return (it == rhs.it); } bool operator != (const iterator& rhs) const { return !(operator == (rhs)); } - iterator& operator ++ () + iterator& operator ++ () { ::std::advance(it, utf8::internal::sequence_length(it)); return *this; @@ -252,7 +252,7 @@ namespace utf8 iterator temp = *this; ::std::advance(it, utf8::internal::sequence_length(it)); return temp; - } + } iterator& operator -- () { utf8::unchecked::prior(it); @@ -267,7 +267,7 @@ namespace utf8 }; // class iterator } // namespace utf8::unchecked -} // namespace utf8 +} // namespace utf8 #endif // header guard |