Remove use of path as unordered_map key to fix compilation on macos

This commit is contained in:
Mr-Wiseguy 2024-09-28 16:26:16 -04:00
parent 2d57d25121
commit a4f5ee10c8
2 changed files with 2 additions and 2 deletions

View file

@ -236,7 +236,7 @@ namespace recomp {
static void on_code_mod_enabled(ModContext& context, const ModHandle& mod);
std::vector<ModContentType> content_types;
std::unordered_map<std::filesystem::path, ModContainerType> container_types;
std::unordered_map<std::string, ModContainerType> container_types;
// Maps game mod ID to the mod's internal integer ID.
std::unordered_map<std::string, size_t> mod_game_ids;
std::vector<ModHandle> opened_mods;

View file

@ -469,7 +469,7 @@ std::vector<recomp::mods::ModOpenErrorDetails> recomp::mods::ModContext::scan_mo
static const std::vector<ModContentTypeId> empty_content_types{};
std::reference_wrapper<const std::vector<ModContentTypeId>> supported_content_types = std::cref(empty_content_types);
if (mod_path.is_regular_file()) {
auto find_container_it = container_types.find(mod_path.path().extension());
auto find_container_it = container_types.find(mod_path.path().extension().string());
if (find_container_it != container_types.end()) {
is_mod = true;
supported_content_types = find_container_it->second.supported_content_types;