summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modlistbypriorityproxy.cpp2
-rw-r--r--src/organizercore.cpp2
-rw-r--r--src/profile.cpp2
-rw-r--r--src/profile.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/modlistbypriorityproxy.cpp b/src/modlistbypriorityproxy.cpp
index 7dae7a54..d1d045fc 100644
--- a/src/modlistbypriorityproxy.cpp
+++ b/src/modlistbypriorityproxy.cpp
@@ -234,7 +234,7 @@ bool ModListByPriorityProxy::canDropMimeData(const QMimeData* data, Qt::DropActi
bool hasSeparator = false;
unsigned int firstRowIndex = -1;
- int firstRowPriority = INT_MAX;
+ int firstRowPriority = std::numeric_limits<int>::max();
for (auto sourceRow : dropInfo.rows()) {
hasSeparator = hasSeparator || ModInfo::getByIndex(sourceRow)->isSeparator();
if (m_sortOrder == Qt::AscendingOrder && m_profile->getModPriority(sourceRow) < firstRowPriority
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index d6c22d3c..cf641886 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -1943,7 +1943,7 @@ std::vector<Mapping> OrganizerCore::fileMapping(const QString &profileName,
bool overwriteActive = false;
- for (auto mod : profile.getActiveMods()) {
+ for (const auto& mod : profile.getActiveMods()) {
if (std::get<0>(mod).compare("overwrite", Qt::CaseInsensitive) == 0) {
continue;
}
diff --git a/src/profile.cpp b/src/profile.cpp
index caea776c..acda465b 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -591,7 +591,7 @@ std::vector<std::tuple<QString, QString, int> > Profile::getActiveMods()
if ((iter->second != UINT_MAX) && m_ModStatus[iter->second].m_Enabled) {
ModInfo::Ptr modInfo = ModInfo::getByIndex(iter->second);
if (modInfo->hasFlag(ModInfo::FLAG_OVERWRITE))
- result.push_back(std::make_tuple(modInfo->internalName(), modInfo->absolutePath(), INT_MAX));
+ result.push_back(std::make_tuple(modInfo->internalName(), modInfo->absolutePath(), std::numeric_limits<int>::max()));
else
result.push_back(std::make_tuple(modInfo->internalName(), modInfo->absolutePath(), m_ModStatus[iter->second].m_Priority));
}
diff --git a/src/profile.h b/src/profile.h
index d354dd48..d1e3f104 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -243,7 +243,7 @@ public:
*
* @return list of active mods sorted by priority (ascending). "first" is the mod name, "second" is its path
**/
- std::vector<std::tuple<QString, QString, int> > getActiveMods();
+ std::vector<std::tuple<QString, QString, int>> getActiveMods();
/**
* @brief retrieve a mod of the indexes ordered by priority