diff options
Diffstat (limited to 'src/searchindex.h')
-rw-r--r-- | src/searchindex.h | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/src/searchindex.h b/src/searchindex.h index 428f36b..232dcf8 100644 --- a/src/searchindex.h +++ b/src/searchindex.h @@ -61,28 +61,6 @@ struct SIData_Word bool hiPrio; }; -// class to aggregate the search data collected on a worker thread -// and later transfer it to the search index on the main thread. -class SIDataCollection -{ - public: - void setCurrentDoc(const Definition *ctx,const QCString &anchor,bool isSourceFile) - { - m_data.emplace_back(SIData_CurrentDoc(ctx,anchor,isSourceFile)); - } - void addWord(const QCString &word,bool hiPriority) - { - m_data.emplace_back(SIData_Word(word,hiPriority)); - } - - // transfer the collected data into the given search index - void transfer(); - - private: - using SIData = std::variant<SIData_CurrentDoc,SIData_Word>; - std::vector<SIData> m_data; -}; - //----------------------------- /** Writes search index for doxygen provided server based search engine that uses PHP. */ @@ -90,7 +68,7 @@ class SearchIndex { struct URL { - URL(QCString n,QCString u) : name(n), url(u) {} + URL(const QCString &n,const QCString &u) : name(n), url(u) {} QCString name; QCString url; }; @@ -106,7 +84,7 @@ class SearchIndex { public: using URLInfoMap = std::unordered_map<int,URLInfo>; - IndexWord(QCString word) : m_word(word) {} + IndexWord(const QCString &word) : m_word(word) {} void addUrlIndex(int,bool); URLInfoMap urls() const { return m_urls; } QCString word() const { return m_word; } @@ -128,6 +106,7 @@ class SearchIndex std::unordered_map<std::string,int> m_url2IdMap; std::map<int,URL> m_urls; int m_urlIndex = -1; + int m_urlMaxIndex = 0; }; /** Writes search index that should be used with an externally provided search engine, |