From 48096bb6c5d7a2879327c82cc0144eef8e6d8ac8 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Tue, 22 Dec 2020 16:10:48 +0100 Subject: Refactoring: remove unused Doxygen::genericsSDict --- src/classdef.cpp | 17 ----------------- src/classdef.h | 1 - src/doxygen.cpp | 25 ++----------------------- src/doxygen.h | 1 - 4 files changed, 2 insertions(+), 42 deletions(-) diff --git a/src/classdef.cpp b/src/classdef.cpp index aa3b4c1..ff39e29 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -82,12 +82,6 @@ static QCString makeQualifiedNameWithTemplateParameters(const ClassDef *cd, bool isSpecialization = cd->localName().find('<')!=-1; QCString clName = cd->className(); - //bool isGeneric = getLanguage()==SrcLangExt_CSharp; - //if (isGeneric && clName.right(2)=="-g") - //{ - // clName = clName.left(clName.length()-2); - //} - //printf("m_impl->lang=%d clName=%s isSpecialization=%d\n",getLanguage(),clName.data(),isSpecialization); scName+=clName; if (!cd->templateArguments().empty()) { @@ -239,7 +233,6 @@ class ClassDefImpl : public DefinitionMixin virtual const ClassDef *tagLessReference() const; virtual MemberDef *isSmartPointer() const; virtual bool isJavaEnum() const; - virtual bool isGeneric() const; virtual QCString title() const; virtual QCString generatedFromFiles() const; virtual const FileList &usedFiles() const; @@ -522,8 +515,6 @@ class ClassDefAliasImpl : public DefinitionAliasMixin { return getCdAlias()->isSmartPointer(); } virtual bool isJavaEnum() const { return getCdAlias()->isJavaEnum(); } - virtual bool isGeneric() const - { return getCdAlias()->isGeneric(); } virtual QCString title() const { return getCdAlias()->title(); } virtual QCString generatedFromFiles() const @@ -725,8 +716,6 @@ class ClassDefImpl::IMPL /** Does this class represent a Java style enum? */ bool isJavaEnum = false; - bool isGeneric = false; - uint64 spec = 0; QCString metaData; @@ -783,7 +772,6 @@ void ClassDefImpl::IMPL::init(const char *defFileName, const char *name, { isLocal=FALSE; } - isGeneric = (lang==SrcLangExt_CSharp || lang==SrcLangExt_Java) && QCString(name).find('<')!=-1; } ClassDefImpl::IMPL::IMPL() : vhdlSummaryTitles(17) @@ -5023,11 +5011,6 @@ bool ClassDefImpl::isJavaEnum() const return m_impl->isJavaEnum; } -bool ClassDefImpl::isGeneric() const -{ - return m_impl->isGeneric; -} - void ClassDefImpl::setClassSpecifier(uint64 spec) { m_impl->spec = spec; diff --git a/src/classdef.h b/src/classdef.h index 6d2bbef..62db01e 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -340,7 +340,6 @@ class ClassDef : public Definition virtual bool isJavaEnum() const = 0; - virtual bool isGeneric() const = 0; virtual QCString title() const = 0; virtual QCString generatedFromFiles() const = 0; diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 4cf1e8b..95d8465 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -161,7 +161,6 @@ int Doxygen::subpageNestingLevel = 0; bool Doxygen::userComments = FALSE; QCString Doxygen::spaces; bool Doxygen::generatingXmlOutput = FALSE; -GenericsSDict *Doxygen::genericsDict; DefinesPerFileList Doxygen::macroDefinitions; bool Doxygen::clangAssistedParsing = FALSE; @@ -1064,8 +1063,8 @@ static void addClassToContext(const Entry *root) std::unique_ptr( createClassDef(tagInfo?tagName:root->fileName,root->startLine,root->startColumn, fullName,sec,tagName,refFileName,TRUE,root->spec&Entry::Enum) ))); - Debug::print(Debug::Classes,0," New class '%s' (sec=0x%08x)! #tArgLists=%d tagInfo=%p hidden=%d artificial=%d isGeneric=%d\n", - qPrint(fullName),sec,root->tArgLists.size(), tagInfo,root->hidden,root->artificial,cd->isGeneric()); + Debug::print(Debug::Classes,0," New class '%s' (sec=0x%08x)! #tArgLists=%d tagInfo=%p hidden=%d artificial=%d\n", + qPrint(fullName),sec,root->tArgLists.size(), tagInfo,root->hidden,root->artificial); cd->setDocumentation(root->doc,root->docFile,root->docLine); // copy docs to definition cd->setBriefDescription(root->brief,root->briefFile,root->briefLine); cd->setLanguage(root->lang); @@ -1097,11 +1096,6 @@ static void addClassToContext(const Entry *root) cd->insertUsedFile(fd); - if (cd->isGeneric()) // generics are also stored in a separate dictionary for fast lookup of instances - { - //printf("inserting generic '%s' cd=%p\n",fullName.data(),cd); - Doxygen::genericsDict->insert(fullName,cd); - } } cd->addSectionsToDefinition(root->anchors); @@ -3852,13 +3846,6 @@ static ClassDef *findClassWithinClassContext(Definition *context,ClassDef *cd,co result = getClass(name); } //printf("3. result=%p\n",result); - if (result==0 && - (cd->getLanguage()==SrcLangExt_CSharp || cd->getLanguage()==SrcLangExt_Java) && - name.find('<')!=-1) - { - result = Doxygen::genericsDict->find(name); - } - //printf("4. result=%p\n",result); //printf("** Trying to find %s within context %s class %s result=%s lookup=%p\n", // name.data(), // context ? context->name().data() : "", @@ -4323,12 +4310,6 @@ static bool findClassRelation( int i=baseClassName.findRev('<'); int si=baseClassName.findRev("::",i==-1 ? baseClassName.length() : i); if (si==-1) si=0; - if (baseClass==0 && (root->lang==SrcLangExt_CSharp || root->lang==SrcLangExt_Java)) - { - // for Java/C# strip the template part before looking for matching - baseClass = toClassDefMutable(Doxygen::genericsDict->find(baseClassName.left(i))); - //printf("looking for '%s' result=%p\n",baseClassName.data(),baseClass); - } if (baseClass==0 && i!=-1) // base class has template specifiers { @@ -10052,7 +10033,6 @@ void initDoxygen() Doxygen::memGrpInfoDict.setAutoDelete(TRUE); Doxygen::tagDestinationDict.setAutoDelete(TRUE); Doxygen::dirRelations.setAutoDelete(TRUE); - Doxygen::genericsDict = new GenericsSDict; Doxygen::indexList = new IndexList; // initialisation of these globals depends on @@ -10085,7 +10065,6 @@ void cleanUpDoxygen() SectionManager::instance().clear(); delete Doxygen::indexList; - delete Doxygen::genericsDict; delete Doxygen::inputNameLinkedMap; delete Doxygen::includeNameLinkedMap; delete Doxygen::exampleNameLinkedMap; diff --git a/src/doxygen.h b/src/doxygen.h index a9a708d..76b8ef9 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -139,7 +139,6 @@ class Doxygen static int subpageNestingLevel; static QCString spaces; static bool generatingXmlOutput; - static GenericsSDict *genericsDict; static DefinesPerFileList macroDefinitions; static bool clangAssistedParsing; }; -- cgit v0.12