summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2021-12-25 19:24:16 +0100
committerRoland Reichwein <mail@reichwein.it>2021-12-25 19:24:16 +0100
commita6a6c121e9e45c15a61802da739cd8ca257bf22c (patch)
treebd2712c86ad8dc5fd82cab5a45a4f50f8c037b46 /include
parent93f5f4322298b23fc6a1a1ca55187956ce30bfe8 (diff)
Fix minor issues
Diffstat (limited to 'include')
-rw-r--r--include/unicode.h4
1 files 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<size_t n>
inline static internal_type value_byte0_of(value_type b) noexcept
{
- return static_cast<char32_t>(b & (0b1111111 >> n)) << ((n - 1) * 6);
+ return static_cast<internal_type>(b & (0b1111111 >> n)) << ((n - 1) * 6);
}
template<class X = value_type, typename std::enable_if<(sizeof(X) == 1), bool>::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<char32_t>(unit0 & 0x03FF) << 10 | (unit1 & 0x03FF)) + 0x10000;
+ return (static_cast<internal_type>(unit0 & 0x03FF) << 10 | (unit1 & 0x03FF)) + 0x10000;
}
}