From 4f6d95d77e8eb4e017cc6956faffb68cc0f96525 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 20 Dec 2023 23:25:00 +0100 Subject: [PATCH] Fix warning. --- core/string/ustring.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 283afec73..7e1785e8c 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -3514,7 +3514,9 @@ Error String::parse_utf16(const char16_t *p_utf16, int p_len) { { const char16_t *ptrtmp = p_utf16; const char16_t *ptrtmp_limit = &p_utf16[p_len]; +#if PRINT_UNICODE_ERRORS uint32_t c_prev = 0; +#endif bool skip = false; while (ptrtmp != ptrtmp_limit && *ptrtmp) { uint32_t c = (byteswap) ? BSWAP16(*ptrtmp) : *ptrtmp; @@ -3541,7 +3543,9 @@ Error String::parse_utf16(const char16_t *p_utf16, int p_len) { skip = false; } +#if PRINT_UNICODE_ERRORS c_prev = c; +#endif str_size++; cstr_size++; ptrtmp++;