diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2016-01-17 12:06:16 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2016-01-17 15:04:33 (GMT) |
commit | a93ec7221d1a258f0268e0c081782478372efe0b (patch) | |
tree | 5f7e41dd02582a699a6f6f6540c463c5d168983e /src/definition.cpp | |
parent | 4dfc5887660284b345eb93b6c07dc1f91e780fac (diff) | |
download | Doxygen-a93ec7221d1a258f0268e0c081782478372efe0b.zip Doxygen-a93ec7221d1a258f0268e0c081782478372efe0b.tar.gz Doxygen-a93ec7221d1a258f0268e0c081782478372efe0b.tar.bz2 |
Changed configuration mechanism to directly access options in order to improve performance
Diffstat (limited to 'src/definition.cpp')
-rw-r--r-- | src/definition.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/definition.cpp b/src/definition.cpp index d04dd59..ec30cd5 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -149,7 +149,7 @@ void DefinitionImpl::init(const char *df, const char *n) static bool matchExcludedSymbols(const char *name) { - static QStrList &exclSyms = Config_getList("EXCLUDE_SYMBOLS"); + static QStrList &exclSyms = Config_getList(EXCLUDE_SYMBOLS); if (exclSyms.count()==0) return FALSE; // nothing specified const char *pat = exclSyms.first(); QCString symName = name; @@ -206,7 +206,7 @@ static bool matchExcludedSymbols(const char *name) void Definition::addToMap(const char *name,Definition *d) { - bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); + bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); QCString symbolName = name; int index=computeQualifiedIndex(symbolName); if (!vhdlOpt && index!=-1) symbolName=symbolName.mid(index+2); @@ -631,7 +631,7 @@ static bool lastCharIsMultibyte(const QCString &s) void Definition::_setBriefDescription(const char *b,const char *briefFile,int briefLine) { - static QCString outputLanguage = Config_getEnum("OUTPUT_LANGUAGE"); + static QCString outputLanguage = Config_getEnum(OUTPUT_LANGUAGE); static bool needsDot = outputLanguage!="Japanese" && outputLanguage!="Chinese" && outputLanguage!="Korean"; @@ -728,8 +728,8 @@ void Definition::setInbodyDocumentation(const char *d,const char *inbodyFile,int bool readCodeFragment(const char *fileName, int &startLine,int &endLine,QCString &result) { - static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES"); - static int tabSize = Config_getInt("TAB_SIZE"); + static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES); + static int tabSize = Config_getInt(TAB_SIZE); //printf("readCodeFragment(%s,%d,%d)\n",fileName,startLine,endLine); if (fileName==0 || fileName[0]==0) return FALSE; // not a valid file name QCString filter = getFileFilter(fileName,TRUE); @@ -886,7 +886,7 @@ QCString Definition::getSourceFileBase() const { ASSERT(definitionType()!=Definition::TypeFile); // file overloads this method QCString fn; - static bool sourceBrowser = Config_getBool("SOURCE_BROWSER"); + static bool sourceBrowser = Config_getBool(SOURCE_BROWSER); if (sourceBrowser && m_impl->body && m_impl->body->startLine!=-1 && m_impl->body->fileDef) { @@ -917,8 +917,8 @@ QCString Definition::getSourceAnchor() const /*! Write a reference to the source code defining this definition */ void Definition::writeSourceDef(OutputList &ol,const char *) { - static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE"); - static bool rtfSourceCode = Config_getBool("RTF_SOURCE_CODE"); + static bool latexSourceCode = Config_getBool(LATEX_SOURCE_CODE); + static bool rtfSourceCode = Config_getBool(RTF_SOURCE_CODE); ol.pushGeneratorState(); //printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef); QCString fn = getSourceFileBase(); @@ -1096,7 +1096,7 @@ bool Definition::hasSources() const /*! Write code of this definition into the documentation */ void Definition::writeInlineCode(OutputList &ol,const char *scopeName) { - static bool inlineSources = Config_getBool("INLINE_SOURCES"); + static bool inlineSources = Config_getBool(INLINE_SOURCES); ol.pushGeneratorState(); //printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(), // m_startBodyLine,m_endBodyLine,m_bodyDef); @@ -1142,10 +1142,10 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName) void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName, const QCString &text,MemberSDict *members,bool /*funcOnly*/) { - static bool latexSourceCode = Config_getBool("LATEX_SOURCE_CODE"); - static bool rtfSourceCode = Config_getBool("RTF_SOURCE_CODE"); - static bool sourceBrowser = Config_getBool("SOURCE_BROWSER"); - static bool refLinkSource = Config_getBool("REFERENCES_LINK_SOURCE"); + static bool latexSourceCode = Config_getBool(LATEX_SOURCE_CODE); + static bool rtfSourceCode = Config_getBool(RTF_SOURCE_CODE); + static bool sourceBrowser = Config_getBool(SOURCE_BROWSER); + static bool refLinkSource = Config_getBool(REFERENCES_LINK_SOURCE); ol.pushGeneratorState(); if (members) { @@ -1276,7 +1276,7 @@ void Definition::_writeSourceRefList(OutputList &ol,const char *scopeName, void Definition::writeSourceReffedBy(OutputList &ol,const char *scopeName) { - if (Config_getBool("REFERENCED_BY_RELATION")) + if (Config_getBool(REFERENCED_BY_RELATION)) { _writeSourceRefList(ol,scopeName,theTranslator->trReferencedBy(),m_impl->sourceRefByDict,FALSE); } @@ -1284,7 +1284,7 @@ void Definition::writeSourceReffedBy(OutputList &ol,const char *scopeName) void Definition::writeSourceRefs(OutputList &ol,const char *scopeName) { - if (Config_getBool("REFERENCES_RELATION")) + if (Config_getBool(REFERENCES_RELATION)) { _writeSourceRefList(ol,scopeName,theTranslator->trReferences(),m_impl->sourceRefsDict,TRUE); } @@ -1292,8 +1292,8 @@ void Definition::writeSourceRefs(OutputList &ol,const char *scopeName) bool Definition::hasDocumentation() const { - static bool extractAll = Config_getBool("EXTRACT_ALL"); - //static bool sourceBrowser = Config_getBool("SOURCE_BROWSER"); + static bool extractAll = Config_getBool(EXTRACT_ALL); + //static bool sourceBrowser = Config_getBool(SOURCE_BROWSER); bool hasDocs = (m_impl->details && !m_impl->details->doc.isEmpty()) || // has detailed docs (m_impl->brief && !m_impl->brief->doc.isEmpty()) || // has brief description @@ -1741,7 +1741,7 @@ QCString abbreviate(const char *s,const char *name) result=result.left(result.length()-1); // strip any predefined prefix - QStrList &briefDescAbbrev = Config_getList("ABBREVIATE_BRIEF"); + QStrList &briefDescAbbrev = Config_getList(ABBREVIATE_BRIEF); const char *p = briefDescAbbrev.first(); while (p) { @@ -1941,7 +1941,7 @@ void Definition::_setSymbolName(const QCString &name) bool Definition::hasBriefDescription() const { - static bool briefMemberDesc = Config_getBool("BRIEF_MEMBER_DESC"); + static bool briefMemberDesc = Config_getBool(BRIEF_MEMBER_DESC); return !briefDescription().isEmpty() && briefMemberDesc; } |