diff options
| author | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2021-01-11 12:49:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-11 12:49:42 +0100 |
| commit | 1dc2b225485a073d82e08a9820493086b2dda8b8 (patch) | |
| tree | 5a4e5478d577f065c7282cb62992c2b6c735e13f /src/modinfo.h | |
| parent | a680dfa3e94b34bf6b0ebd65d29d7a9799e3183f (diff) | |
| parent | 05efc74e402ca3770d9fdaa2557f4030c31ee198 (diff) | |
Merge pull request #1350 from Holt59/collapsible-separators
Collapsible separators - Fix & Improvements.
Diffstat (limited to 'src/modinfo.h')
| -rw-r--r-- | src/modinfo.h | 63 |
1 files changed, 28 insertions, 35 deletions
diff --git a/src/modinfo.h b/src/modinfo.h index 08ed94f8..634ea900 100644 --- a/src/modinfo.h +++ b/src/modinfo.h @@ -868,46 +868,35 @@ public: // Nexus stuff public: // Conflicts - /** - * @return retrieve list of mods (as mod index) that are overwritten by this one. - * Updates may be delayed. - */ - virtual std::set<unsigned int> getModOverwrite() const { - return std::set<unsigned int>(); } + // retrieve the list of mods (as mod index) that are overwritten by this one. + // Updates may be delayed. + // + virtual const std::set<unsigned int>& getModOverwrite() const { return s_EmptySet; } - /** - * @return list of mods (as mod index) that overwrite this one. Updates may be delayed. - */ - virtual std::set<unsigned int> getModOverwritten() const { - return std::set<unsigned int>(); } + // retrieve the list of mods (as mod index) that overwrite this one. + // Updates may be delayed. + // + virtual const std::set<unsigned int>& getModOverwritten() const { return s_EmptySet; } - /** - * @return retrieve list of mods (as mod index) with archives that are overwritten by - * this one. Updates may be delayed - */ - virtual std::set<unsigned int> getModArchiveOverwrite() const { - return std::set<unsigned int>(); } + // retrieve the list of mods (as mod index) with archives that are overwritten by + // this one. Updates may be delayed + // + virtual const std::set<unsigned int>& getModArchiveOverwrite() const { return s_EmptySet; } - /** - * @return list of mods (as mod index) with archives that overwrite this one. Updates - * may be delayed. - */ - virtual std::set<unsigned int> getModArchiveOverwritten() const { - return std::set<unsigned int>(); } + // retrieve the list of mods (as mod index) with archives that overwrite this one. Updates + // may be delayed. + // + virtual const std::set<unsigned int>& getModArchiveOverwritten() const { return s_EmptySet; } - /** - * @return the list of mods (as mod index) with archives that are overwritten by loose - * files of this mod. Updates may be delayed. - */ - virtual std::set<unsigned int> getModArchiveLooseOverwrite() const { - return std::set<unsigned int>(); } + // retrieve the list of mods (as mod index) with archives that are overwritten by loose + // files of this mod. Updates may be delayed. + // + virtual const std::set<unsigned int>& getModArchiveLooseOverwrite() const { return s_EmptySet; } - /** - * @return the list of mods (as mod index) with loose files that overwrite this one's - * archive files. Updates may be delayed. - */ - virtual std::set<unsigned int> getModArchiveLooseOverwritten() const { - return std::set<unsigned int>(); } + // retrieve the list of mods (as mod index) with loose files that overwrite this one's + // archive files. Updates may be delayed. + // + virtual const std::set<unsigned int>& getModArchiveLooseOverwritten() const { return s_EmptySet; } /** * @brief Update conflict information. @@ -960,6 +949,10 @@ protected: MOBase::VersionInfo m_Version; bool m_PluginSelected = false; + // empty set that can be returned in overwrite functions by + // default + static const std::set<unsigned int> s_EmptySet; + protected: friend class OrganizerCore; |
