From 92158c9ce10abe8c6296674a4d2d238d143fe337 Mon Sep 17 00:00:00 2001 From: Nemanja Trifunovic Date: Tue, 2 Apr 2019 20:20:28 -0400 Subject: [PATCH] Minor whitespace fixes --- source/utf8/checked.h | 1 - source/utf8/core.h | 8 ++++---- source/utf8/cpp11.h | 1 + source/utf8/unchecked.h | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/utf8/checked.h b/source/utf8/checked.h index 50d4812..bba4995 100644 --- a/source/utf8/checked.h +++ b/source/utf8/checked.h @@ -312,4 +312,3 @@ namespace utf8 #endif //header guard - diff --git a/source/utf8/core.h b/source/utf8/core.h index 1ebd099..e007ca1 100644 --- a/source/utf8/core.h +++ b/source/utf8/core.h @@ -142,7 +142,7 @@ namespace internal if (!utf8::internal::is_trail(*it)) return INCOMPLETE_SEQUENCE; - + return UTF8_OK; } @@ -165,7 +165,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) @@ -222,7 +222,7 @@ namespace internal template utf_error validate_next(octet_iterator& it, octet_iterator end, uint32_t& code_point) { - if (it == end) + if (it == end) return NOT_ENOUGH_ROOM; // Save the original value of it so we can go back in case of failure @@ -237,7 +237,7 @@ namespace internal // Get trail octets and calculate the code point utf_error err = UTF8_OK; switch (length) { - case 0: + case 0: return INVALID_LEAD; case 1: err = utf8::internal::get_sequence_1(it, end, cp); diff --git a/source/utf8/cpp11.h b/source/utf8/cpp11.h index a021c33..34fcc72 100644 --- a/source/utf8/cpp11.h +++ b/source/utf8/cpp11.h @@ -101,3 +101,4 @@ namespace utf8 } // namespace utf8 #endif // header guard + diff --git a/source/utf8/unchecked.h b/source/utf8/unchecked.h index 3d36183..3af7c15 100644 --- a/source/utf8/unchecked.h +++ b/source/utf8/unchecked.h @@ -38,7 +38,7 @@ namespace utf8 octet_iterator append(uint32_t cp, octet_iterator result) { if (cp < 0x80) // one octet - *(result++) = static_cast(cp); + *(result++) = static_cast(cp); else if (cp < 0x800) { // two octets *(result++) = static_cast((cp >> 6) | 0xc0); *(result++) = static_cast((cp & 0x3f) | 0x80); @@ -85,13 +85,13 @@ namespace utf8 break; } ++it; - return cp; + return cp; } template uint32_t peek_next(octet_iterator it) { - return utf8::unchecked::next(it); + return utf8::unchecked::next(it); } template @@ -121,7 +121,7 @@ namespace utf8 template octet_iterator utf16to8 (u16bit_iterator start, u16bit_iterator end, octet_iterator result) - { + { while (start != end) { uint32_t cp = utf8::internal::mask16(*start++); // Take care of surrogate pairs first @@ -131,7 +131,7 @@ namespace utf8 } result = utf8::unchecked::append(cp, result); } - return result; + return result; } template