From f7eede23de6f78b2b33b477b2b4c5451141825d5 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Wed, 2 Oct 2024 19:51:41 -0500 Subject: Add setup for coverage and cppcheck. --- source/fud_utf8.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/fud_utf8.cpp') 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; -- cgit v1.2.3