From 78cfc95ffa2ab2026c5e1408b60945dbcb6ca2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Prost=20Fr=C3=A9d=C3=A9ric?= Date: Tue, 19 Nov 2019 22:12:48 +0100 Subject: [PATCH] remove tabulation --- source/utf8/checked.h | 28 ++++++++++++++-------------- source/utf8/core.h | 4 ++-- source/utf8/cpp11_facilities.h | 4 ++-- source/utf8/unchecked.h | 24 ++++++++++++------------ 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/source/utf8/checked.h b/source/utf8/checked.h index 7128193..ad1f74e 100644 --- a/source/utf8/checked.h +++ b/source/utf8/checked.h @@ -166,8 +166,8 @@ namespace utf8 uint32_t next(octet_iterator& it, octet_iterator end) { uint32_t cp = next_impl(it, end);//throw if error - ++it; - return cp; + ++it; + return cp; } template @@ -342,10 +342,10 @@ namespace utf8 uint32_t cp{}; bool ok{}; void read() { - ok = it != range_end; - if(ok) { - cp = utf8::next_impl(it, range_end); - } + ok = it != range_end; + if(ok) { + cp = utf8::next_impl(it, range_end); + } } public: @@ -361,7 +361,7 @@ namespace utf8 uint32_t operator * () const { if(!ok) { - throw std::runtime_error("no such element"); + throw std::runtime_error("no such element"); } return cp; } @@ -394,8 +394,8 @@ namespace utf8 template struct get_iterator_class { private: - static input_iterator get(std::input_iterator_tag); - static bidirectional_iterator get(std::bidirectional_iterator_tag); + static input_iterator get(std::input_iterator_tag); + static bidirectional_iterator get(std::bidirectional_iterator_tag); public: using type = decltype(get(Iterator_category{})); }; @@ -429,11 +429,11 @@ namespace utf8 } inline std::pair>, iterator>> make_iterator_pair(std::istream& is) { - using Is_iter = std::istream_iterator; - using Iter = iterator; - auto it = Is_iter{is}; - auto end = Is_iter{}; - return std::make_pair(Iter{it, it, end}, Iter{end, it, end}); + using Is_iter = std::istream_iterator; + using Iter = iterator; + auto it = Is_iter{is}; + auto end = Is_iter{}; + return std::make_pair(Iter{it, it, end}, Iter{end, it, end}); } } // namespace utf8 diff --git a/source/utf8/core.h b/source/utf8/core.h index 584e8c9..1a2aad4 100644 --- a/source/utf8/core.h +++ b/source/utf8/core.h @@ -296,7 +296,7 @@ namespace internal if(err == UTF8_OK) { ++it; } - return err; + return err; } @@ -339,7 +339,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/source/utf8/cpp11_facilities.h b/source/utf8/cpp11_facilities.h index 9e98db0..e4847a5 100644 --- a/source/utf8/cpp11_facilities.h +++ b/source/utf8/cpp11_facilities.h @@ -29,8 +29,8 @@ DEALINGS IN THE SOFTWARE. namespace utf8 { - template - using Iterator_category = typename std::iterator_traits::iterator_category; + template + using Iterator_category = typename std::iterator_traits::iterator_category; } // namespace utf8 diff --git a/source/utf8/unchecked.h b/source/utf8/unchecked.h index 53ce1dc..8179292 100644 --- a/source/utf8/unchecked.h +++ b/source/utf8/unchecked.h @@ -131,9 +131,9 @@ namespace utf8 template inline uint32_t next(octet_iterator& it) { - uint32_t cp{next_impl(it)}; - ++it; - return cp; + uint32_t cp{next_impl(it)}; + ++it; + return cp; } template @@ -276,7 +276,7 @@ namespace utf8 octet_iterator it; uint32_t cp{}; void read() { - cp = utf8::unchecked::next_impl(it); + cp = utf8::unchecked::next_impl(it); } public: @@ -317,12 +317,12 @@ namespace utf8 template struct get_iterator_class { private: - static input_iterator get(std::input_iterator_tag); - static bidirectional_iterator get(std::bidirectional_iterator_tag); + static input_iterator get(std::input_iterator_tag); + static bidirectional_iterator get(std::bidirectional_iterator_tag); public: using type = decltype(get(Iterator_category{})); }; - }//internal + }//internal template using iterator = typename utf8::unchecked::internal::get_iterator_class::type; @@ -351,11 +351,11 @@ namespace utf8 } inline std::pair>, iterator>> make_iterator_pair(std::istream& is) { - using Is_iter = std::istream_iterator; - using Iter = iterator; - auto it = Is_iter{is}; - auto end = Is_iter{}; - return std::make_pair(Iter{it}, Iter{end}); + using Is_iter = std::istream_iterator; + using Iter = iterator; + auto it = Is_iter{is}; + auto end = Is_iter{}; + return std::make_pair(Iter{it}, Iter{end}); } } // namespace utf8::unchecked