diff options
Diffstat (limited to 'include/fud_utf8.hpp')
-rw-r--r-- | include/fud_utf8.hpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/fud_utf8.hpp b/include/fud_utf8.hpp index 99766d4..5b84a3a 100644 --- a/include/fud_utf8.hpp +++ b/include/fud_utf8.hpp @@ -19,7 +19,6 @@ #define FUD_UTF8_HPP #include "fud_array.hpp" -#include "fud_memory.hpp" #include "fud_status.hpp" #include "fud_unique_array.hpp" @@ -62,7 +61,7 @@ constexpr bool validUtf8MB(utf8 code) noexcept struct Ascii { Array<utf8, 1> characters; - constexpr Ascii() noexcept = default; + constexpr Ascii() noexcept = default; // cppcheck-suppress uninitMemberVar constexpr explicit Ascii(utf8 chr) noexcept : characters{{chr}} { @@ -252,10 +251,10 @@ struct FudUtf8 { static constexpr Ascii invalidAsciiCode{Ascii{0xFF}}; static FudUtf8 fromString(const String& fudString, size_t index) noexcept; - static FudUtf8 fromStringView(StringView&& fudView, size_t index) noexcept; - static FudUtf8 fromStringView(const StringView& fudView, size_t index) noexcept; + static FudUtf8 fromStringView(StringView&& view, size_t index) noexcept; + static FudUtf8 fromStringView(const StringView& view, size_t index) noexcept; - static constexpr FudUtf8 makeUtf8(Array<utf8, 4>& data) + static constexpr FudUtf8 makeUtf8(const Array<utf8, 4>& data) { FudUtf8 unicode{}; if (Ascii::valid(data[0])) { @@ -367,10 +366,10 @@ struct FudUtf8 { [[nodiscard]] constexpr int64_t hash() const noexcept { - using fud::Utf8Type; using fud::Utf82Byte; using fud::Utf83Byte; using fud::Utf84Byte; + using fud::Utf8Type; if (!valid()) { return -1; |