diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-04-29 18:13:58 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2021-04-29 18:13:58 (GMT) |
commit | 8f4363909baa0fada9eb2e447b458f2242426f7f (patch) | |
tree | 6a9bb1f5529f4adf70c4d1578663c3a587f17e06 /src | |
parent | f6023c9e4bd77e7c7e03311957b3201399f62114 (diff) | |
download | Doxygen-8f4363909baa0fada9eb2e447b458f2242426f7f.zip Doxygen-8f4363909baa0fada9eb2e447b458f2242426f7f.tar.gz Doxygen-8f4363909baa0fada9eb2e447b458f2242426f7f.tar.bz2 |
Fix to avoid unneeded regeneration of "included-by" graphs
Diffstat (limited to 'src')
-rw-r--r-- | src/dotgraph.cpp | 33 | ||||
-rw-r--r-- | src/filedef.cpp | 3 |
2 files changed, 22 insertions, 14 deletions
diff --git a/src/dotgraph.cpp b/src/dotgraph.cpp index 37a1587..fbcc8ff 100644 --- a/src/dotgraph.cpp +++ b/src/dotgraph.cpp @@ -38,31 +38,36 @@ * are compared with \a md5. If equal FALSE is returned. * The .md5 is created or updated after successful creation of the output file. */ -static bool checkMd5Signature(const QCString &baseName, - const QCString &md5) +static bool sameMd5Signature(const QCString &baseName, + const QCString &md5) { + bool same = false; + char md5stored[33]; + md5stored[0]=0; std::ifstream f(baseName.str()+".md5",std::ifstream::in | std::ifstream::binary); if (f.is_open()) { // read checksum - char md5stored[33]; f.read(md5stored,32); md5stored[32]='\0'; // compare checksum if (!f.fail() && md5==md5stored) { - // bail out if equal - return false; + same = true; } + //printf("sameSignature(%s,%s==%s)=%d\n",qPrint(baseName),md5stored,qPrint(md5),same); } - return true; + else + { + //printf("sameSignature(%s) not found\n",qPrint(baseName)); + } + return same; } -static bool checkDeliverables(const QCString &file1, - const QCString &file2=QCString()) +static bool deliverablesPresent(const QCString &file1,const QCString &file2) { - bool file1Ok = TRUE; - bool file2Ok = TRUE; + bool file1Ok = true; + bool file2Ok = true; if (!file1.isEmpty()) { FileInfo fi(file1.str()); @@ -151,10 +156,10 @@ bool DotGraph::prepareDotFile() // already queued files are processed again in case the output format has changed - if (!checkMd5Signature(absBaseName(), sigStr) && - checkDeliverables(absImgName(), - m_graphFormat == GOF_BITMAP && m_generateImageMap ? absMapName() : QCString() - ) + if (sameMd5Signature(absBaseName(), sigStr) && + deliverablesPresent(absImgName(), + m_graphFormat == GOF_BITMAP && m_generateImageMap ? absMapName() : QCString() + ) ) { // all needed files are there diff --git a/src/filedef.cpp b/src/filedef.cpp index 8686636..7149b97 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -1666,6 +1666,9 @@ void FileDefImpl::sortMemberLists() if (mlg.needsSorting()) { mlg.sort(); mlg.setNeedsSorting(FALSE); } } + std::sort(m_includedByList.begin(),m_includedByList.end(), + [](const auto &fi1,const auto &fi2) { return fi1.includeName < fi2.includeName; }); + if (Config_getBool(SORT_BRIEF_DOCS)) { auto classComp = [](const ClassLinkedRefMap::Ptr &c1,const ClassLinkedRefMap::Ptr &c2) |