MultiSelect: ImGuiSelectionBasicStorage: move function bodies to cpp file.

+ make ImGuiStorage::BuildSortByKey() less affected by msvc debug mode.
This commit is contained in:
ocornut
2024-06-11 19:45:21 +02:00
parent 2af3b2ac81
commit c07864f64a
3 changed files with 49 additions and 12 deletions

View File

@@ -2567,10 +2567,12 @@ static int IMGUI_CDECL PairComparerByID(const void* lhs, const void* rhs)
}
// For quicker full rebuild of a storage (instead of an incremental one), you may add all your contents and then sort once.
IM_MSVC_RUNTIME_CHECKS_OFF
void ImGuiStorage::BuildSortByKey()
{
ImQsort(Data.Data, (size_t)Data.Size, sizeof(ImGuiStoragePair), PairComparerByID);
}
IM_MSVC_RUNTIME_CHECKS_RESTORE
int ImGuiStorage::GetInt(ImGuiID key, int default_val) const
{