summaryrefslogtreecommitdiff
path: root/src/modinfo.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-05-17 14:03:01 +0200
committerTannin <devnull@localhost>2015-05-17 14:03:01 +0200
commit268d2ffe8b533890b408740db1a6a3730dfd8597 (patch)
tree889aec6383b1880cb99b3cd8ebe014485661d8e5 /src/modinfo.cpp
parent9d3364f4da3fe77113147d9350c0e8c8c7f7a637 (diff)
- some code cleanup and modernization trying to fix "dr memory" reports
(though they were almost certainly false positives) - there is now a 50ms timeout on logging messages - bugfix: leaked handles after directory searches
Diffstat (limited to 'src/modinfo.cpp')
-rw-r--r--src/modinfo.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp
index 923ad855..bbc72c72 100644
--- a/src/modinfo.cpp
+++ b/src/modinfo.cpp
@@ -277,11 +277,10 @@ int ModInfo::checkAllForUpdate(QObject *receiver)
modIDs.push_back(GameInfo::instance().getNexusModID());
- for (std::vector<ModInfo::Ptr>::iterator iter = s_Collection.begin();
- iter != s_Collection.end(); ++iter) {
- if ((*iter)->canBeUpdated()) {
- modIDs.push_back((*iter)->getNexusID());
- if (modIDs.size() >= 255) {
+ for (const ModInfo::Ptr &mod : s_Collection) {
+ if (mod->canBeUpdated()) {
+ modIDs.push_back(mod->getNexusID());
+ if (modIDs.size() >= chunkSize) {
checkChunkForUpdate(modIDs, receiver);
modIDs.clear();
}