@@ -3294,36 +3294,6 @@ ImGuiID ImGuiWindow::GetID(int n)
3294
3294
return id;
3295
3295
}
3296
3296
3297
- ImGuiID ImGuiWindow::GetIDNoKeepAlive(const char* str, const char* str_end)
3298
- {
3299
- ImGuiID seed = IDStack.back();
3300
- ImGuiID id = ImHashStr(str, str_end ? (str_end - str) : 0, seed);
3301
- ImGuiContext& g = *GImGui;
3302
- if (g.DebugHookIdInfo == id)
3303
- ImGui::DebugHookIdInfo(id, ImGuiDataType_String, str, str_end);
3304
- return id;
3305
- }
3306
-
3307
- ImGuiID ImGuiWindow::GetIDNoKeepAlive(const void* ptr)
3308
- {
3309
- ImGuiID seed = IDStack.back();
3310
- ImGuiID id = ImHashData(&ptr, sizeof(void*), seed);
3311
- ImGuiContext& g = *GImGui;
3312
- if (g.DebugHookIdInfo == id)
3313
- ImGui::DebugHookIdInfo(id, ImGuiDataType_Pointer, ptr, NULL);
3314
- return id;
3315
- }
3316
-
3317
- ImGuiID ImGuiWindow::GetIDNoKeepAlive(int n)
3318
- {
3319
- ImGuiID seed = IDStack.back();
3320
- ImGuiID id = ImHashData(&n, sizeof(n), seed);
3321
- ImGuiContext& g = *GImGui;
3322
- if (g.DebugHookIdInfo == id)
3323
- ImGui::DebugHookIdInfo(id, ImGuiDataType_S32, (void*)(intptr_t)n, NULL);
3324
- return id;
3325
- }
3326
-
3327
3297
// This is only used in rare/specific situations to manufacture an ID out of nowhere.
3328
3298
ImGuiID ImGuiWindow::GetIDFromRectangle(const ImRect& r_abs)
3329
3299
{
@@ -7420,31 +7390,31 @@ void ImGui::PushID(const char* str_id)
7420
7390
{
7421
7391
ImGuiContext& g = *GImGui;
7422
7392
ImGuiWindow* window = g.CurrentWindow;
7423
- ImGuiID id = window->GetIDNoKeepAlive (str_id);
7393
+ ImGuiID id = window->GetID (str_id);
7424
7394
window->IDStack.push_back(id);
7425
7395
}
7426
7396
7427
7397
void ImGui::PushID(const char* str_id_begin, const char* str_id_end)
7428
7398
{
7429
7399
ImGuiContext& g = *GImGui;
7430
7400
ImGuiWindow* window = g.CurrentWindow;
7431
- ImGuiID id = window->GetIDNoKeepAlive (str_id_begin, str_id_end);
7401
+ ImGuiID id = window->GetID (str_id_begin, str_id_end);
7432
7402
window->IDStack.push_back(id);
7433
7403
}
7434
7404
7435
7405
void ImGui::PushID(const void* ptr_id)
7436
7406
{
7437
7407
ImGuiContext& g = *GImGui;
7438
7408
ImGuiWindow* window = g.CurrentWindow;
7439
- ImGuiID id = window->GetIDNoKeepAlive (ptr_id);
7409
+ ImGuiID id = window->GetID (ptr_id);
7440
7410
window->IDStack.push_back(id);
7441
7411
}
7442
7412
7443
7413
void ImGui::PushID(int int_id)
7444
7414
{
7445
7415
ImGuiContext& g = *GImGui;
7446
7416
ImGuiWindow* window = g.CurrentWindow;
7447
- ImGuiID id = window->GetIDNoKeepAlive (int_id);
7417
+ ImGuiID id = window->GetID (int_id);
7448
7418
window->IDStack.push_back(id);
7449
7419
}
7450
7420
0 commit comments