diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-05-27 22:45:42 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-05-27 22:45:42 +0200 |
| commit | 700c5fb16c1c4e39fd757998e95ead4a25ecc6da (patch) | |
| tree | 723e3c3b9d6b72d3fc69b27632adf6e750169eb7 /src/modinfowithconflictinfo.h | |
| parent | 6f22a77cdac588abcb60ac4c45d795b74872c626 (diff) | |
Store contents as a set instead of a vector.
Diffstat (limited to 'src/modinfowithconflictinfo.h')
| -rw-r--r-- | src/modinfowithconflictinfo.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modinfowithconflictinfo.h b/src/modinfowithconflictinfo.h index b66a7444..7109b83d 100644 --- a/src/modinfowithconflictinfo.h +++ b/src/modinfowithconflictinfo.h @@ -6,6 +6,7 @@ #include "thread_utils.h" #include "modinfo.h" +#include <set> #include <QTime> class ModInfoWithConflictInfo : public ModInfo @@ -24,7 +25,7 @@ public: /** * @return a list of content types contained in a mod */ - virtual const std::vector<int>& getContents() const override; + virtual const std::set<int>& getContents() const override; /** * @brief Test if the mod contains the specified content. @@ -75,7 +76,7 @@ protected: * * @return the contents for this mod. **/ - virtual std::vector<int> doGetContents() const { return {}; } + virtual std::set<int> doGetContents() const { return {}; } /** * @brief Retrieve a file tree corresponding to the underlying disk content @@ -146,7 +147,7 @@ private: MOShared::MemoizedLocked<std::shared_ptr<const MOBase::IFileTree>> m_FileTree; MOShared::MemoizedLocked<bool> m_Valid; - MOShared::MemoizedLocked<std::vector<int>> m_Contents; + MOShared::MemoizedLocked<std::set<int>> m_Contents; MOShared::DirectoryEntry **m_DirectoryStructure; |
