summaryrefslogtreecommitdiffstats
path: root/src/pre.l
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-04-18 11:45:40 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-04-18 11:45:40 (GMT)
commit28fc7d1fce3cc8e7fa26e3760e8d8d79b9dd23a5 (patch)
tree3104ca2ea1f3e3f94cb54c99f8dde84745b497c2 /src/pre.l
parentf3ebc866c88b31ab393637e30189d41ddb7f84f0 (diff)
downloadDoxygen-28fc7d1fce3cc8e7fa26e3760e8d8d79b9dd23a5.zip
Doxygen-28fc7d1fce3cc8e7fa26e3760e8d8d79b9dd23a5.tar.gz
Doxygen-28fc7d1fce3cc8e7fa26e3760e8d8d79b9dd23a5.tar.bz2
Refactoring: changed Doxygen::expandAsDefinedDict to Doxygen::expandAsDefinedSet
Diffstat (limited to 'src/pre.l')
-rw-r--r--src/pre.l8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pre.l b/src/pre.l
index 18394ad..351511b 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -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;
}