mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 03:58:47 +02:00
Internals: wrapped ImQsort() in an inline function + added a define guard.
This commit is contained in:
@ -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];
|
||||
|
Reference in New Issue
Block a user