diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2025-03-30 23:08:43 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2025-03-30 23:08:43 -0500 |
commit | cb9fa588ba8144fcdd52ba4b83d69d93fb18066f (patch) | |
tree | 214574ca68c1551ec76e7fbb9e0263793180231d /include/fud_utf8.hpp | |
parent | 1d357adfa19725ee69fb267a363f1fd217b1272f (diff) |
Add hash map.
Diffstat (limited to 'include/fud_utf8.hpp')
-rw-r--r-- | include/fud_utf8.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/fud_utf8.hpp b/include/fud_utf8.hpp index 030164d..bdc6720 100644 --- a/include/fud_utf8.hpp +++ b/include/fud_utf8.hpp @@ -290,6 +290,7 @@ static_assert(Utf8TypeSet.m_values[3] == static_cast<uint8_t>(Utf8Type::Utf84Byt | U+10000 | U+10FFFF | 11110xxx | 10xxxxxx | 10xxxxxx | 10xxxxxx */ constexpr Utf8Type utf8TypeFromByte(utf8 input) { + // NOLINTBEGIN(readability-magic-numbers) if ((input >> 7) == 0) { return Utf8Type::Ascii; } @@ -302,7 +303,7 @@ constexpr Utf8Type utf8TypeFromByte(utf8 input) { if ((input >> 3) == 0b11110) { return Utf8Type::Utf84Byte; } - + // NOLINTEND(readability-magic-numbers) return Utf8Type::Invalid; } @@ -527,7 +528,7 @@ struct Utf8 { return std::strong_ordering::greater; } - Option<Ascii> getAscii() const + [[nodiscard]] Option<Ascii> getAscii() const { if (m_variant.index() == static_cast<size_t>(Utf8Type::Ascii)) { return std::get<Ascii>(m_variant); |