Skip to content

Commit bf059df

Browse files
committed
Refactoring: replace g_compoundKeywordDict by g_compoundKeywords
1 parent fe36e44 commit bf059df

File tree

1 file changed

+10
-38
lines changed

1 file changed

+10
-38
lines changed

src/doxygen.cpp

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ bool Doxygen::clangAssistedParsing = FALSE;
164164
// locally accessible globals
165165
static std::multimap< std::string, const Entry* > g_classEntries;
166166
static StringVector g_inputFiles;
167-
static QDict<void> g_compoundKeywordDict(7); // keywords recognised as compounds
167+
static StringSet g_compoundKeywords; // keywords recognised as compounds
168168
static OutputList *g_outputList = 0; // list of output generating objects
169169
static QDict<FileDef> g_usingDeclarations(1009); // used classes
170170
static bool g_successfulRun = FALSE;
@@ -243,36 +243,8 @@ class Statistics
243243

244244
void statistics()
245245
{
246-
#if 0
247-
fprintf(stderr,"--- inputNameLinkedMap stats ----\n");
248-
Doxygen::inputNameLinkedMap->statistics();
249-
fprintf(stderr,"--- includeNameDict stats ----\n");
250-
Doxygen::includeNameDict->statistics();
251-
fprintf(stderr,"--- exampleNameDict stats ----\n");
252-
Doxygen::exampleNameDict->statistics();
253-
fprintf(stderr,"--- imageNameDict stats ----\n");
254-
Doxygen::imageNameDict->statistics();
255-
fprintf(stderr,"--- dotFileNameDict stats ----\n");
256-
Doxygen::dotFileNameDict->statistics();
257-
fprintf(stderr,"--- mscFileNameDict stats ----\n");
258-
Doxygen::mscFileNameDict->statistics();
259-
fprintf(stderr,"--- diaFileNameDict stats ----\n");
260-
Doxygen::diaFileNameDict->statistics();
261-
fprintf(stderr,"--- memGrpInfoDict stats ----\n");
262-
Doxygen::memGrpInfoDict.statistics();
263-
#endif
264-
//fprintf(stderr,"--- g_excludeNameDict stats ----\n");
265-
//g_excludeNameDict.statistics();
266-
//fprintf(stderr,"--- aliasDict stats ----\n");
267-
//Doxygen::aliasDict.statistics();
268-
//fprintf(stderr,"--- tagDestinationDict stats ----\n");
269-
//Doxygen::tagDestinationDict.statistics();
270-
fprintf(stderr,"--- g_compoundKeywordDict stats ----\n");
271-
g_compoundKeywordDict.statistics();
272246
}
273247

274-
275-
276248
static void addMemberDocs(const Entry *root,MemberDefMutable *md, const char *funcDecl,
277249
const ArgumentList *al,bool over_load,uint64 spec);
278250
static void findMember(const Entry *root,
@@ -2906,7 +2878,7 @@ static void buildVarList(const Entry *root)
29062878
//printf("buildVarList(%s) section=%08x\n",rootNav->name().data(),rootNav->section());
29072879
int isFuncPtr=-1;
29082880
if (!root->name.isEmpty() &&
2909-
(root->type.isEmpty() || g_compoundKeywordDict.find(root->type)==0) &&
2881+
(root->type.isEmpty() || g_compoundKeywords.find(root->type.str())==g_compoundKeywords.end()) &&
29102882
(
29112883
(root->section==Entry::VARIABLE_SEC // it's a variable
29122884
) ||
@@ -6746,7 +6718,7 @@ static void filterMemberDocumentation(const Entry *root,const QCString relates)
67466718
||
67476719
(root->section==Entry::VARIABLE_SEC && // variable
67486720
!type.isEmpty() && // with a type
6749-
g_compoundKeywordDict.find(type)==0 // that is not a keyword
6721+
g_compoundKeywords.find(type.str())==g_compoundKeywords.end() // that is not a keyword
67506722
// (to skip forward declaration of class etc.)
67516723
)
67526724
)
@@ -10145,13 +10117,13 @@ void initDoxygen()
1014510117
* Initialize some global constants
1014610118
**************************************************************************/
1014710119

10148-
g_compoundKeywordDict.insert("template class",(void *)8);
10149-
g_compoundKeywordDict.insert("template struct",(void *)8);
10150-
g_compoundKeywordDict.insert("class",(void *)8);
10151-
g_compoundKeywordDict.insert("struct",(void *)8);
10152-
g_compoundKeywordDict.insert("union",(void *)8);
10153-
g_compoundKeywordDict.insert("interface",(void *)8);
10154-
g_compoundKeywordDict.insert("exception",(void *)8);
10120+
g_compoundKeywords.insert("template class");
10121+
g_compoundKeywords.insert("template struct");
10122+
g_compoundKeywords.insert("class");
10123+
g_compoundKeywords.insert("struct");
10124+
g_compoundKeywords.insert("union");
10125+
g_compoundKeywords.insert("interface");
10126+
g_compoundKeywords.insert("exception");
1015510127
}
1015610128

1015710129
void cleanUpDoxygen()

0 commit comments

Comments
 (0)