diff options
| author | Tannin <devnull@localhost> | 2013-07-17 20:58:58 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2013-07-17 20:58:58 +0200 |
| commit | d0f2c4fcf79222d5c6f3c17188a811b0a47833c6 (patch) | |
| tree | 12c9e4f529caa0f5830c8dd52d785b3e2df5462b /src/pluginlist.cpp | |
| parent | 36ac91e0b765b1ae099e93054447beca8f461f74 (diff) | |
- now avoids a few unnecessary copy operations during generation of the directory structure
- bugfix: circular dependency caused a memory leak
- bugfix: removing a single mod lead to the wrong mod being deleted
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index df132287..61069c2f 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -116,10 +116,10 @@ void PluginList::refresh(const QString &profileName, const DirectoryEntry &baseD m_CurrentProfile = profileName; - std::vector<FileEntry*> files = baseDirectory.getFiles(); + std::vector<FileEntry::Ptr> files = baseDirectory.getFiles(); for (auto iter = files.begin(); iter != files.end(); ++iter) { - FileEntry *current = *iter; - if (current == NULL) { + FileEntry::Ptr current = *iter; + if (current.get() == NULL) { continue; } QString filename = ToQString(current->getName()); @@ -450,8 +450,8 @@ bool PluginList::saveLoadOrder(DirectoryEntry &directoryStructure) for (std::vector<ESPInfo>::iterator iter = m_ESPs.begin(); iter != m_ESPs.end(); ++iter) { std::wstring espName = ToWString(iter->m_Name); - const FileEntry *fileEntry = directoryStructure.findFile(espName); - if (fileEntry != NULL) { + const FileEntry::Ptr fileEntry = directoryStructure.findFile(espName); + if (fileEntry.get() != NULL) { QString fileName; bool archive = false; int originid = fileEntry->getOrigin(archive); |
