From f919e0917344d7396f03423ef4fcd4d41fe37b07 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Thu, 7 Jan 2021 20:11:26 +0100 Subject: Show conflicts and highligth plugins from collapsed separators. --- src/modinfo.h | 63 ++++++++++++++++++++++++++--------------------------------- 1 file changed, 28 insertions(+), 35 deletions(-) (limited to 'src/modinfo.h') 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 getModOverwrite() const { - return std::set(); } + // retrieve the list of mods (as mod index) that are overwritten by this one. + // Updates may be delayed. + // + virtual const std::set& getModOverwrite() const { return s_EmptySet; } - /** - * @return list of mods (as mod index) that overwrite this one. Updates may be delayed. - */ - virtual std::set getModOverwritten() const { - return std::set(); } + // retrieve the list of mods (as mod index) that overwrite this one. + // Updates may be delayed. + // + virtual const std::set& 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 getModArchiveOverwrite() const { - return std::set(); } + // retrieve the list of mods (as mod index) with archives that are overwritten by + // this one. Updates may be delayed + // + virtual const std::set& 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 getModArchiveOverwritten() const { - return std::set(); } + // retrieve the list of mods (as mod index) with archives that overwrite this one. Updates + // may be delayed. + // + virtual const std::set& 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 getModArchiveLooseOverwrite() const { - return std::set(); } + // 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& 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 getModArchiveLooseOverwritten() const { - return std::set(); } + // 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& 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 s_EmptySet; + protected: friend class OrganizerCore; -- cgit v1.3.1