diff options
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); |