Minor optimization: reduce redudant label scanning in common widgets.

This commit is contained in:
ocornut
2026-04-09 14:25:34 +02:00
parent c2565fe642
commit 11de9df44c
3 changed files with 45 additions and 30 deletions
+2
View File
@@ -64,6 +64,8 @@ Other Changes:
reporting the common clipper error over a table sanity check assert). (#9350)
- Tweaked assert triggering when first item height measurement fails, and made it
a better recoverable error. (#9350)
- Misc:
- Minor optimization: reduce redudant label scanning in common widgets.
- Backends:
- Metal: avoid redundant vertex buffer bind in SetupRenderState, which leads
to validation issue. (#9343) [@Hunam6]
+2 -2
View File
@@ -3832,7 +3832,7 @@ void ImGui::RenderText(ImVec2 pos, const char* text, const char* text_end, bool
else
{
if (!text_end)
text_end = text + ImStrlen(text); // FIXME-OPT
text_end = text + ImStrlen(text); // FIXME-OPT (not reached by our internal calls)
text_display_end = text_end;
}
@@ -3850,7 +3850,7 @@ void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end
ImGuiWindow* window = g.CurrentWindow;
if (!text_end)
text_end = text + ImStrlen(text); // FIXME-OPT
text_end = text + ImStrlen(text); // FIXME-OPT (not reached by our internal calls)
if (text != text_end)
{
+41 -28
View File
File diff suppressed because it is too large Load Diff