Skip to content

Commit 82a0ccf

Browse files
authored
Warning text fix (#242)
* Warning text fix * Update ModLoader.cpp
1 parent f1a847e commit 82a0ccf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ImperatorToCK3/Source/Imperator/ModLoader/ModLoader.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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\tNo 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
5555
void 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) << "\tImperator: 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\tSavegame 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\tSavegame 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\tFound 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\tFound a compressed mod named " << theMod.getName() << " with a mod file at " << imperatorModsPath << "/"
113113
<< trimmedModFileName << " and itself at " << theMod.getPath();
114114
}

0 commit comments

Comments
 (0)