mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 20:07:01 +00:00
Minor FindTextDisplayEnd() optimisation
This commit is contained in:
parent
e01500f046
commit
3cac434737
@ -2048,7 +2048,9 @@ void ImGui::Render()
|
||||
static const char* FindTextDisplayEnd(const char* text, const char* text_end = NULL)
|
||||
{
|
||||
const char* text_display_end = text;
|
||||
while ((!text_end || text_display_end < text_end) && *text_display_end != '\0' && (text_display_end[0] != '#' || text_display_end[1] != '#'))
|
||||
if (!text_end)
|
||||
text_end = (const char*)-1;
|
||||
while (text_display_end < text_end && *text_display_end != '\0' && (text_display_end[0] != '#' || text_display_end[1] != '#'))
|
||||
text_display_end++;
|
||||
return text_display_end;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user