diff options
-rw-r--r-- | src/doxygen.cpp | 9 | ||||
-rw-r--r-- | src/doxygen.h | 4 | ||||
-rw-r--r-- | src/pre.l | 8 |
3 files changed, 10 insertions, 11 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 56f395a..c59b075 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -136,7 +136,7 @@ FileNameLinkedMap *Doxygen::mscFileNameLinkedMap = 0; // msc files FileNameLinkedMap *Doxygen::diaFileNameLinkedMap = 0; // dia files StringDict Doxygen::namespaceAliasDict(257); // all namespace aliases StringDict Doxygen::tagDestinationDict(257); // all tag locations -QDict<void> Doxygen::expandAsDefinedDict(257); // all macros that should be expanded +std::unordered_set<std::string> Doxygen::expandAsDefinedSet; // all macros that should be expanded QIntDict<MemberGroupInfo> Doxygen::memGrpInfoDict(1009); // dictionary of the member groups heading PageDef *Doxygen::mainPage = 0; bool Doxygen::insideMainPage = FALSE; // are we generating docs for the main page? @@ -275,8 +275,6 @@ void statistics() Doxygen::tagDestinationDict.statistics(); fprintf(stderr,"--- g_compoundKeywordDict stats ----\n"); g_compoundKeywordDict.statistics(); - fprintf(stderr,"--- expandAsDefinedDict stats ----\n"); - Doxygen::expandAsDefinedDict.statistics(); fprintf(stderr,"--- memGrpInfoDict stats ----\n"); Doxygen::memGrpInfoDict.statistics(); } @@ -10311,10 +10309,7 @@ void adjustConfiguration() s=expandAsDefinedList.first(); while (s) { - if (Doxygen::expandAsDefinedDict[s]==0) - { - Doxygen::expandAsDefinedDict.insert(s,(void *)666); - } + Doxygen::expandAsDefinedSet.insert(s); s=expandAsDefinedList.next(); } diff --git a/src/doxygen.h b/src/doxygen.h index a18ac3b..d04b0b3 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -22,6 +22,8 @@ #include <qdict.h> #include <qintdict.h> +#include <unordered_set> + #include "ftextstream.h" #include "sortdict.h" #include "membergroup.h" @@ -114,7 +116,7 @@ class Doxygen static StringDict tagDestinationDict; static StringDict aliasDict; static QIntDict<MemberGroupInfo> memGrpInfoDict; - static QDict<void> expandAsDefinedDict; + static std::unordered_set<std::string> expandAsDefinedSet; static NamespaceDef *globalScope; static QCString htmlFileExtension; static bool parseSourcesNeeded; @@ -30,6 +30,7 @@ #include <deque> #include <algorithm> #include <set> +#include <unordered_set> #include <string> #include <map> #include <utility> @@ -334,7 +335,7 @@ void DefineManager::DefinesPerFile::collectDefines( * * global state */ -static std::set<std::string> g_allIncludes; +static std::unordered_set<std::string> g_allIncludes; static DefineManager g_defineManager; @@ -396,7 +397,7 @@ struct preYY_state std::stack< std::unique_ptr<CondCtx> > condStack; std::deque< std::unique_ptr<FileState> > includeStack; std::map<std::string,Define*> expandedDict; - std::set<std::string> expanded; + std::unordered_set<std::string> expanded; ConstExpressionParser constExpParser; }; @@ -2781,7 +2782,8 @@ static std::unique_ptr<Define> newDefine(yyscan_t yyscanner) //printf("newDefine: %s %s file: %s\n",def->name.data(),def->definition.data(), // def->fileDef ? def->fileDef->name().data() : def->fileName.data()); //printf("newDefine: '%s'->'%s'\n",def->name.data(),def->definition.data()); - if (!def->name.isEmpty() && Doxygen::expandAsDefinedDict[def->name]) + if (!def->name.isEmpty() && + Doxygen::expandAsDefinedSet.find(def->name.data())!=Doxygen::expandAsDefinedSet.end()) { def->isPredefined=TRUE; } |