summaryrefslogtreecommitdiff
path: root/source/fud_utf8.cpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-10-02 19:51:41 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-10-02 19:51:41 -0500
commitf7eede23de6f78b2b33b477b2b4c5451141825d5 (patch)
treed698a92272b8e4a8428b82d9a21f3e98ed267a6d /source/fud_utf8.cpp
parent32c722d50943bbdeba65a77d5e94f8692cf75f3c (diff)
Add setup for coverage and cppcheck.
Diffstat (limited to 'source/fud_utf8.cpp')
-rw-r--r--source/fud_utf8.cpp12
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;