summaryrefslogtreecommitdiff
path: root/src/modinfo.h
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-07 20:11:26 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-10 10:27:30 +0100
commitf919e0917344d7396f03423ef4fcd4d41fe37b07 (patch)
tree3cf695b5ce9d77da121a8088a67272654d689921 /src/modinfo.h
parent5765439c7cff4e314a0c5732432bdb7b20e91efd (diff)
Show conflicts and highligth plugins from collapsed separators.
Diffstat (limited to 'src/modinfo.h')
-rw-r--r--src/modinfo.h63
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;