aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/keyvalues.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/keyvalues.cpp')
-rw-r--r--NorthstarDedicatedTest/keyvalues.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/NorthstarDedicatedTest/keyvalues.cpp b/NorthstarDedicatedTest/keyvalues.cpp
index 3d527e62..61170177 100644
--- a/NorthstarDedicatedTest/keyvalues.cpp
+++ b/NorthstarDedicatedTest/keyvalues.cpp
@@ -53,9 +53,9 @@ void ModManager::TryBuildKeyValues(const char* filename)
for (int i = m_loadedMods.size() - 1; i > -1; i--)
{
size_t fileHash = std::hash<std::string>{}(normalisedPath);
- for (int j = 0; j < m_loadedMods[i]->KeyValuesHash.size(); j++)
+ for (int j = 0; j < m_loadedMods[i].KeyValuesHash.size(); j++)
{
- if (fileHash == m_loadedMods[i]->KeyValuesHash[j])
+ if (fileHash == m_loadedMods[i].KeyValuesHash[j])
{
// should result in smth along the lines of #include "mod_patch_5_mp_weapon_car.txt"
@@ -70,7 +70,7 @@ void ModManager::TryBuildKeyValues(const char* filename)
fs::remove(compiledDir / patchFilePath);
- fs::copy_file(m_loadedMods[i]->ModDirectory / "keyvalues" / filename, compiledDir / patchFilePath);
+ fs::copy_file(m_loadedMods[i].ModDirectory / "keyvalues" / filename, compiledDir / patchFilePath);
}
}
}
@@ -120,9 +120,9 @@ void ModManager::TryBuildKeyValues(const char* filename)
writeStream << newKvs;
writeStream.close();
- ModOverrideFile* overrideFile = new ModOverrideFile;
- overrideFile->owningMod = nullptr;
- overrideFile->path = normalisedPath;
+ ModOverrideFile overrideFile;
+ overrideFile.owningMod = nullptr;
+ overrideFile.path = normalisedPath;
if (m_modFiles.find(normalisedPath) == m_modFiles.end())
m_modFiles.insert(std::make_pair(normalisedPath, overrideFile));