From cb9fa588ba8144fcdd52ba4b83d69d93fb18066f Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Sun, 30 Mar 2025 23:08:43 -0500 Subject: Add hash map. --- include/fud_utf8.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/fud_utf8.hpp') 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(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 getAscii() const + [[nodiscard]] Option getAscii() const { if (m_variant.index() == static_cast(Utf8Type::Ascii)) { return std::get(m_variant); -- cgit v1.2.3