mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Internals: wrapped ImQsort() in an inline function + added a define guard.
This commit is contained in:
parent
66f0fb986c
commit
9d704d99d3
3 changed files with 8 additions and 9 deletions
|
|
@ -1954,8 +1954,7 @@ void ImGuiStorage::BuildSortByKey()
|
|||
return 0;
|
||||
}
|
||||
};
|
||||
if (Data.Size > 1)
|
||||
ImQsort(Data.Data, (size_t)Data.Size, sizeof(ImGuiStoragePair), StaticFunc::PairCompareByID);
|
||||
ImQsort(Data.Data, (size_t)Data.Size, sizeof(ImGuiStoragePair), StaticFunc::PairCompareByID);
|
||||
}
|
||||
|
||||
int ImGuiStorage::GetInt(ImGuiID key, int default_val) const
|
||||
|
|
@ -4304,8 +4303,7 @@ static void AddWindowToSortBuffer(ImVector<ImGuiWindow*>* out_sorted_windows, Im
|
|||
if (window->Active)
|
||||
{
|
||||
int count = window->DC.ChildWindows.Size;
|
||||
if (count > 1)
|
||||
ImQsort(window->DC.ChildWindows.Data, (size_t)count, sizeof(ImGuiWindow*), ChildWindowComparer);
|
||||
ImQsort(window->DC.ChildWindows.Data, (size_t)count, sizeof(ImGuiWindow*), ChildWindowComparer);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
ImGuiWindow* child = window->DC.ChildWindows[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue