@@ -44,7 +44,7 @@ void Imperator::ModLoader::loadMods(const Configuration& configuration, const Mo
4444
4545 // All verified mods go into usableMods
4646 Log (LogLevel::Info) << " \t\t ->> Found potentially useful [" << usedModName << " ]: " << *possibleModPath + " /" ;
47- usableMods.insert ( std::pair ( usedModName, *possibleModPath + " /" ) );
47+ usableMods.emplace ( usedModName, *possibleModPath + " /" );
4848 } else {
4949 Log (LogLevel::Warning) << " \t\t No path could be found for " << usedModName
5050 << " . Check that the mod is present and that the .mod file specifies the path for the mod" ;
@@ -55,16 +55,16 @@ void Imperator::ModLoader::loadMods(const Configuration& configuration, const Mo
5555void Imperator::ModLoader::loadImperatorModDirectory (const Configuration& configuration, const ModPaths& incomingMods) {
5656 const auto & imperatorModsPath = configuration.getImperatorDocsPath () + " /mod" ;
5757 if (!commonItems::DoesFolderExist (imperatorModsPath))
58- throw std::invalid_argument (" Imperator: Rome mods directory path is invalid! Is it at: " + configuration. getImperatorDocsPath () + " /mod/ ?" );
58+ throw std::invalid_argument (" Imperator: Rome mods directory path is invalid! Is it at: " + imperatorModsPath + " ?" );
5959
6060 Log (LogLevel::Info) << " \t Imperator: Rome mods directory is " << imperatorModsPath;
6161
6262 const auto diskModNames = commonItems::GetAllFilesInFolder (imperatorModsPath);
6363 for (const auto & usedModFilePath : incomingMods) {
6464 const auto trimmedModFileName = trimPath (usedModFilePath);
6565 if (!diskModNames.contains (trimmedModFileName)) {
66- Log (LogLevel::Warning) << " \t\t Savegame uses " << usedModFilePath << " at " << usedModFilePath
67- << " which is not present on disk. Skipping at your risk, but this can greatly affect conversion." ;
66+ Log (LogLevel::Warning) << " \t\t Savegame uses " << trimmedModFileName
67+ << " which is not present on disk. Skipping at your risk, but this can greatly affect conversion." ;
6868 continue ;
6969 }
7070 if (getExtension (trimmedModFileName) != " mod" ) {
@@ -93,7 +93,7 @@ void Imperator::ModLoader::loadImperatorModDirectory(const Configuration& config
9393 }
9494 }
9595
96- possibleMods.insert ( std::make_pair ( theMod.getName (), theMod.getPath () ));
96+ possibleMods.emplace ( theMod.getName (), theMod.getPath ());
9797 Log (LogLevel::Info) << " \t\t Found potential mod named " << theMod.getName () << " with a mod file at " << imperatorModsPath + " /" + trimmedModFileName
9898 << " and itself at " << theMod.getPath ();
9999 } else {
@@ -108,7 +108,7 @@ void Imperator::ModLoader::loadImperatorModDirectory(const Configuration& config
108108 continue ;
109109 }
110110 }
111- possibleCompressedMods.insert ( std::make_pair ( theMod.getName (), theMod.getPath () ));
111+ possibleCompressedMods.emplace ( theMod.getName (), theMod.getPath ());
112112 Log (LogLevel::Info) << " \t\t Found a compressed mod named " << theMod.getName () << " with a mod file at " << imperatorModsPath << " /"
113113 << trimmedModFileName << " and itself at " << theMod.getPath ();
114114 }
0 commit comments