From cf1bbdd13e0db8856df672c367d3ec1610f6c556 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Mon, 25 May 2020 19:53:21 +0200 Subject: Switch to using the ModDataContent feature from the game plugin. --- src/modinfowithconflictinfo.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/modinfowithconflictinfo.h') diff --git a/src/modinfowithconflictinfo.h b/src/modinfowithconflictinfo.h index abc9f223..b66a7444 100644 --- a/src/modinfowithconflictinfo.h +++ b/src/modinfowithconflictinfo.h @@ -24,7 +24,16 @@ public: /** * @return a list of content types contained in a mod */ - virtual std::vector getContents() const override; + virtual const std::vector& getContents() const override; + + /** + * @brief Test if the mod contains the specified content. + * + * @param content ID of the content to test. + * + * @return true if the content is there, false otherwise. + */ + virtual bool hasContent(int content) const override; /** * @brief clear all caches held for this mod @@ -66,7 +75,7 @@ protected: * * @return the contents for this mod. **/ - virtual std::vector doGetContents() const { return {}; } + virtual std::vector doGetContents() const { return {}; } /** * @brief Retrieve a file tree corresponding to the underlying disk content @@ -137,7 +146,7 @@ private: MOShared::MemoizedLocked> m_FileTree; MOShared::MemoizedLocked m_Valid; - MOShared::MemoizedLocked> m_Contents; + MOShared::MemoizedLocked> m_Contents; MOShared::DirectoryEntry **m_DirectoryStructure; -- cgit v1.3.1