From a6a6c121e9e45c15a61802da739cd8ca257bf22c Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 25 Dec 2021 19:24:16 +0100 Subject: Fix minor issues --- include/unicode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/unicode.h b/include/unicode.h index c9f2331..8e120ad 100644 --- a/include/unicode.h +++ b/include/unicode.h @@ -112,7 +112,7 @@ namespace unicode::detail { template inline static internal_type value_byte0_of(value_type b) noexcept { - return static_cast(b & (0b1111111 >> n)) << ((n - 1) * 6); + return static_cast(b & (0b1111111 >> n)) << ((n - 1) * 6); } template::type = true> @@ -173,7 +173,7 @@ namespace unicode::detail { throw std::invalid_argument("Bad input: 2 malformed UTF-16 surrogates"); std::advance(iterator, 2); - return (static_cast(unit0 & 0x03FF) << 10 | (unit1 & 0x03FF)) + 0x10000; + return (static_cast(unit0 & 0x03FF) << 10 | (unit1 & 0x03FF)) + 0x10000; } } -- cgit v1.2.3