Rewrite routing data buffers to strip old entries + sort by key to make queries not touch scattered data. Entries D,A,B,B,A,C,B --> A,A,B,B,B,C,D Index A:1 B:2 C:5 D:0 --> A:0 B:2 C:5 D:6 See 'Metrics->Key Owners & Shortcut Routing' to visualize the result of that operation.
| 9964 | void ImGui::PopFontSize() |
| 9965 | { |
| 9966 | PopFont(); |
| 9967 | } |
| 9968 | |
| 9969 | //----------------------------------------------------------------------------- |
| 9970 | // [SECTION] ID STACK |
| 9971 | //----------------------------------------------------------------------------- |
| 9972 | |
| 9973 | // This is one of the very rare legacy case where we use ImGuiWindow methods, |
| 9974 | // it should ideally be flattened at some point but it's been used a lots by widgets. |
| 9975 | IM_MSVC_RUNTIME_CHECKS_OFF |
| 9976 | ImGuiID ImGuiWindow::GetID(const char* str, const char* str_end) |
| 9977 | { |
| 9978 | ImGuiID seed = IDStack.back(); |
| 9979 | ImGuiID id = ImHashStr(str, str_end ? (str_end - str) : 0, seed); |
| 9980 | #ifndef IMGUI_DISABLE_DEBUG_TOOLS |
| 9981 | ImGuiContext& g = *Ctx; |
| 9982 | if (g.DebugHookIdInfoId == id) |
| 9983 | ImGui::DebugHookIdInfo(id, ImGuiDataType_String, str, str_end); |
| 9984 | #endif |
| 9985 | return id; |
| 9986 | } |
| 9987 | |
| 9988 | ImGuiID ImGuiWindow::GetID(const void* ptr) |
| 9989 | { |
| 9990 | ImGuiID seed = IDStack.back(); |
| 9991 | ImGuiID id = ImHashData(&ptr, sizeof(void*), seed); |
| 9992 | #ifndef IMGUI_DISABLE_DEBUG_TOOLS |
| 9993 | ImGuiContext& g = *Ctx; |
| 9994 | if (g.DebugHookIdInfoId == id) |
| 9995 | ImGui::DebugHookIdInfo(id, ImGuiDataType_Pointer, ptr, NULL); |
| 9996 | #endif |
| 9997 | return id; |
| 9998 | } |
| 9999 | |
| 10000 | ImGuiID ImGuiWindow::GetID(int n) |
| 10001 | { |
| 10002 | ImGuiID seed = IDStack.back(); |
| 10003 | ImGuiID id = ImHashData(&n, sizeof(n), seed); |
| 10004 | #ifndef IMGUI_DISABLE_DEBUG_TOOLS |
| 10005 | ImGuiContext& g = *Ctx; |
| 10006 | if (g.DebugHookIdInfoId == id) |
| 10007 | ImGui::DebugHookIdInfo(id, ImGuiDataType_S32, (void*)(intptr_t)n, NULL); |
nothing calls this directly
no test coverage detected