| 1867 | } |
| 1868 | |
| 1869 | bool IGFD::FileManager::M_SortStrings(const FileDialogInternal& vFileDialogInternal, const bool vInsensitiveCase, const bool vDescendingOrder, const std::string& vA, const std::string& vB) { |
| 1870 | if (vFileDialogInternal.getDialogConfig().flags & ImGuiFileDialogFlags_NaturalSorting) { |
| 1871 | return IGFD::Utils::NaturalCompare(vA, vB, vInsensitiveCase, vDescendingOrder); |
| 1872 | } else if (vInsensitiveCase) { |
| 1873 | const auto ret = stricmp(vA.c_str(), vB.c_str()); |
| 1874 | return vDescendingOrder ? (ret > 0) : (ret < 0); |
| 1875 | } else { |
| 1876 | const auto ret = strcmp(vA.c_str(), vB.c_str()); |
| 1877 | return vDescendingOrder ? (ret > 0) : (ret < 0); |
| 1878 | } |
| 1879 | } |
| 1880 | |
| 1881 | void IGFD::FileManager::m_SortFields(const FileDialogInternal& vFileDialogInternal, std::vector<std::shared_ptr<FileInfos> >& vFileInfosList, std::vector<std::shared_ptr<FileInfos> >& vFileInfosFilteredList) { |
| 1882 | if (sortingField != SortingFieldEnum::FIELD_NONE) { |
nothing calls this directly
no outgoing calls
no test coverage detected