MCPcopy Create free account
hub / github.com/dfranx/ImFileDialog / m_clearIcons

Method m_clearIcons

ImFileDialog.cpp:822–838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

820#endif
821 }
822 void FileDialog::m_clearIcons()
823 {
824 std::vector<unsigned int> deletedIcons;
825
826 // delete textures
827 for (auto& icon : m_icons) {
828 unsigned int ptr = (unsigned int)((uintptr_t)icon.second);
829 if (std::count(deletedIcons.begin(), deletedIcons.end(), ptr)) // skip duplicates
830 continue;
831
832 deletedIcons.push_back(ptr);
833 DeleteTexture(icon.second);
834 }
835 m_iconFilepaths.clear();
836 m_iconIndices.clear();
837 m_icons.clear();
838 }
839 void FileDialog::m_refreshIconPreview()
840 {
841 if (m_zoom >= 5.0f) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected