diff options
Diffstat (limited to 'source/fud_utf8.cpp')
-rw-r--r-- | source/fud_utf8.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/fud_utf8.cpp b/source/fud_utf8.cpp index 1c23581..50b5d31 100644 --- a/source/fud_utf8.cpp +++ b/source/fud_utf8.cpp @@ -41,32 +41,32 @@ FudUtf8 FudUtf8::fromStringView(const StringView& view, size_t index) noexcept FudUtf8 FudUtf8::fromStringView(StringView&& view, size_t index) noexcept { auto len = view.length(); - const auto* data = view.data(); - if (data == nullptr) { + const auto* vData = view.data(); + if (vData == nullptr) { return invalidAscii(); } - FudUtf8 localChar{Ascii{data[index]}}; + FudUtf8 localChar{Ascii{vData[index]}}; if (localChar.valid()) { return localChar; } if (index + 1 < len) { - localChar.m_variant = Utf82Byte{data[index], data[index + 1]}; + localChar.m_variant = Utf82Byte{vData[index], vData[index + 1]}; } if (localChar.valid()) { return localChar; } if (index + 2 < len) { - localChar.m_variant = Utf83Byte{data[index], data[index + 1], data[index + 2]}; + localChar.m_variant = Utf83Byte{vData[index], vData[index + 1], vData[index + 2]}; } if (localChar.valid()) { return localChar; } if (index + 3 < len) { - localChar.m_variant = Utf84Byte{data[index], data[index + 1], data[index + 2], data[index + 3]}; + localChar.m_variant = Utf84Byte{vData[index], vData[index + 1], vData[index + 2], vData[index + 3]}; } if (localChar.valid()) { return localChar; |