@@ -1362,7 +1362,6 @@ const char* ImStristr(const char* haystack, const char* haystack_end, const char
13621362
13631363const char* ImStrstr(ImStr haystack, ImStr needle)
13641364{
1365- IM_IMSTR_ENSURE_HAS_END(needle);
13661365 const char un0 = (char)*needle.Begin;
13671366 while ((!haystack.End && *haystack.Begin) || (haystack.End && haystack.Begin < haystack.End))
13681367 {
@@ -2085,8 +2084,7 @@ bool ImGuiTextFilter::PassFilter(ImStr text) const
20852084 if (Filters.empty())
20862085 return true;
20872086
2088- IM_IMSTR_ENSURE_HAS_END(text);
2089- if (text.Empty())
2087+ if (text.Empty()) // FIXME-IMSTR
20902088 text.Begin = text.End = "";
20912089
20922090 for (int i = 0; i != Filters.Size; i++)
@@ -2661,14 +2659,9 @@ void ImGui::RenderText(ImVec2 pos, ImStr text, bool hide_text_after_hash)
26612659 // Hide anything after a '##' string
26622660 const char* text_display_end;
26632661 if (hide_text_after_hash)
2664- {
26652662 text_display_end = FindRenderedTextEnd(text);
2666- }
26672663 else
2668- {
2669- IM_IMSTR_ENSURE_HAS_END(text);
26702664 text_display_end = text.End;
2671- }
26722665
26732666 if (text.Begin != text_display_end)
26742667 {
@@ -2682,7 +2675,6 @@ void ImGui::RenderTextWrapped(ImVec2 pos, ImStr text, float wrap_width)
26822675{
26832676 ImGuiContext& g = *GImGui;
26842677 ImGuiWindow* window = g.CurrentWindow;
2685- IM_IMSTR_ENSURE_HAS_END(text);
26862678
26872679 if (text.Begin != text.End)
26882680 {
@@ -2918,7 +2910,6 @@ ImGuiID ImGuiWindow::GetID(ImStr str)
29182910 ImGui::KeepAliveID(id);
29192911#ifdef IMGUI_ENABLE_TEST_ENGINE
29202912 ImGuiContext& g = *GImGui;
2921- IM_IMSTR_ENSURE_HAS_END(str);
29222913 IMGUI_TEST_ENGINE_ID_INFO2(id, ImGuiDataType_String, str.Begin, str.End);
29232914#endif
29242915 return id;
@@ -2954,7 +2945,6 @@ ImGuiID ImGuiWindow::GetIDNoKeepAlive(ImStr str)
29542945 ImGuiID id = ImHashStr(str, seed);
29552946#ifdef IMGUI_ENABLE_TEST_ENGINE
29562947 ImGuiContext& g = *GImGui;
2957- IM_IMSTR_ENSURE_HAS_END(str);
29582948 IMGUI_TEST_ENGINE_ID_INFO2(id, ImGuiDataType_String, str.Begin, str.End);
29592949#endif
29602950 return id;
@@ -4414,7 +4404,6 @@ ImVec2 ImGui::CalcTextSize(ImStr text, bool hide_text_after_double_hash, float w
44144404{
44154405 ImGuiContext& g = *GImGui;
44164406
4417- IM_IMSTR_ENSURE_HAS_END(text);
44184407 if (hide_text_after_double_hash)
44194408 text.End = FindRenderedTextEnd(text); // Hide anything after a '##' string
44204409
0 commit comments