Internals: removed GetIDNoKeepAlive() now that it is the same as GetID(). (#5181)
Amend 9038678
diff --git a/imgui.cpp b/imgui.cpp
index 2eb67f5..1eda261 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -3294,36 +3294,6 @@
return id;
}
-ImGuiID ImGuiWindow::GetIDNoKeepAlive(const char* str, const char* str_end)
-{
- ImGuiID seed = IDStack.back();
- ImGuiID id = ImHashStr(str, str_end ? (str_end - str) : 0, seed);
- ImGuiContext& g = *GImGui;
- if (g.DebugHookIdInfo == id)
- ImGui::DebugHookIdInfo(id, ImGuiDataType_String, str, str_end);
- return id;
-}
-
-ImGuiID ImGuiWindow::GetIDNoKeepAlive(const void* ptr)
-{
- ImGuiID seed = IDStack.back();
- ImGuiID id = ImHashData(&ptr, sizeof(void*), seed);
- ImGuiContext& g = *GImGui;
- if (g.DebugHookIdInfo == id)
- ImGui::DebugHookIdInfo(id, ImGuiDataType_Pointer, ptr, NULL);
- return id;
-}
-
-ImGuiID ImGuiWindow::GetIDNoKeepAlive(int n)
-{
- ImGuiID seed = IDStack.back();
- ImGuiID id = ImHashData(&n, sizeof(n), seed);
- ImGuiContext& g = *GImGui;
- if (g.DebugHookIdInfo == id)
- ImGui::DebugHookIdInfo(id, ImGuiDataType_S32, (void*)(intptr_t)n, NULL);
- return id;
-}
-
// This is only used in rare/specific situations to manufacture an ID out of nowhere.
ImGuiID ImGuiWindow::GetIDFromRectangle(const ImRect& r_abs)
{
@@ -7420,7 +7390,7 @@
{
ImGuiContext& g = *GImGui;
ImGuiWindow* window = g.CurrentWindow;
- ImGuiID id = window->GetIDNoKeepAlive(str_id);
+ ImGuiID id = window->GetID(str_id);
window->IDStack.push_back(id);
}
@@ -7428,7 +7398,7 @@
{
ImGuiContext& g = *GImGui;
ImGuiWindow* window = g.CurrentWindow;
- ImGuiID id = window->GetIDNoKeepAlive(str_id_begin, str_id_end);
+ ImGuiID id = window->GetID(str_id_begin, str_id_end);
window->IDStack.push_back(id);
}
@@ -7436,7 +7406,7 @@
{
ImGuiContext& g = *GImGui;
ImGuiWindow* window = g.CurrentWindow;
- ImGuiID id = window->GetIDNoKeepAlive(ptr_id);
+ ImGuiID id = window->GetID(ptr_id);
window->IDStack.push_back(id);
}
@@ -7444,7 +7414,7 @@
{
ImGuiContext& g = *GImGui;
ImGuiWindow* window = g.CurrentWindow;
- ImGuiID id = window->GetIDNoKeepAlive(int_id);
+ ImGuiID id = window->GetID(int_id);
window->IDStack.push_back(id);
}
diff --git a/imgui_internal.h b/imgui_internal.h
index 3614374..4242935 100644
--- a/imgui_internal.h
+++ b/imgui_internal.h
@@ -2117,9 +2117,6 @@
ImGuiID GetID(const char* str, const char* str_end = NULL);
ImGuiID GetID(const void* ptr);
ImGuiID GetID(int n);
- ImGuiID GetIDNoKeepAlive(const char* str, const char* str_end = NULL);
- ImGuiID GetIDNoKeepAlive(const void* ptr);
- ImGuiID GetIDNoKeepAlive(int n);
ImGuiID GetIDFromRectangle(const ImRect& r_abs);
// We don't use g.FontSize because the window may be != g.CurrentWidow.
diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp
index 8e83b5c..04b419e 100644
--- a/imgui_widgets.cpp
+++ b/imgui_widgets.cpp
@@ -856,7 +856,7 @@
ImGuiID ImGui::GetWindowScrollbarID(ImGuiWindow* window, ImGuiAxis axis)
{
- return window->GetIDNoKeepAlive(axis == ImGuiAxis_X ? "#SCROLLX" : "#SCROLLY");
+ return window->GetID(axis == ImGuiAxis_X ? "#SCROLLX" : "#SCROLLY");
}
// Return scrollbar rectangle, must only be called for corresponding axis if window->ScrollbarX/Y is set.