mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-07 13:35:49 +02:00
Strip seemingly unecessary tests, as UTF-8 decoder can not return null since 9cca1b2e9
This commit is contained in:
@ -1288,8 +1288,7 @@ void ImGuiIO::AddInputCharactersUTF8(const char* utf8_chars)
|
||||
{
|
||||
unsigned int c = 0;
|
||||
utf8_chars += ImTextCharFromUtf8(&c, utf8_chars, NULL);
|
||||
if (c != 0)
|
||||
AddInputCharacter(c);
|
||||
AddInputCharacter(c);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2032,8 +2031,6 @@ int ImTextStrFromUtf8(ImWchar* buf, int buf_size, const char* in_text, const cha
|
||||
{
|
||||
unsigned int c;
|
||||
in_text += ImTextCharFromUtf8(&c, in_text, in_text_end);
|
||||
if (c == 0)
|
||||
break;
|
||||
*buf_out++ = (ImWchar)c;
|
||||
}
|
||||
*buf_out = 0;
|
||||
@ -2049,8 +2046,6 @@ int ImTextCountCharsFromUtf8(const char* in_text, const char* in_text_end)
|
||||
{
|
||||
unsigned int c;
|
||||
in_text += ImTextCharFromUtf8(&c, in_text, in_text_end);
|
||||
if (c == 0)
|
||||
break;
|
||||
char_count++;
|
||||
}
|
||||
return char_count;
|
||||
|
Reference in New Issue
Block a user