Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Silarn committed Sep 9, 2023
1 parent 94455c2 commit d586bb2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
5 changes: 4 additions & 1 deletion src/directoryrefresher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,10 @@ void DirectoryRefresher::refresh()

for (auto directory : game->secondaryDataDirectories().toStdMap()) {
DirectoryStats dummy;
m_Root->addFromOrigin(directory.first.toStdWString(), QDir::toNativeSeparators(directory.second.absolutePath()).toStdWString(), 0, dummy);
m_Root->addFromOrigin(
directory.first.toStdWString(),
QDir::toNativeSeparators(directory.second.absolutePath()).toStdWString(), 0,
dummy);
}

std::sort(m_Mods.begin(), m_Mods.end(), [](auto lhs, auto rhs) {
Expand Down
13 changes: 5 additions & 8 deletions src/organizercore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2015,8 +2015,8 @@ std::vector<Mapping> OrganizerCore::fileMapping(const QString& profileName,

if (modPtr->isRegular()) {
for (auto dataPath : dataPaths) {
result.insert(result.end(), { QDir::toNativeSeparators(std::get<1>(mod)),
dataPath, true, createTarget });
result.insert(result.end(), {QDir::toNativeSeparators(std::get<1>(mod)),
dataPath, true, createTarget});
}
}
}
Expand All @@ -2039,12 +2039,9 @@ std::vector<Mapping> OrganizerCore::fileMapping(const QString& profileName,
}

for (auto dataPath : dataPaths) {
result.insert(result.end(), {
QDir::toNativeSeparators(m_Settings.paths().overwrite()),
dataPath,
true,
customOverwrite.isEmpty()
});
result.insert(result.end(),
{QDir::toNativeSeparators(m_Settings.paths().overwrite()), dataPath,
true, customOverwrite.isEmpty()});
}

for (MOBase::IPluginFileMapper* mapper :
Expand Down

0 comments on commit d586bb2

Please sign in to comment.