From 6fc45bade4ffebc3d106aa7bdfcf31394d9ba2bc Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Tue, 15 Jun 2021 20:33:32 +0200 Subject: issue #8584: navtree js output varies from ASLR --- src/doxygen.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 8183544..75b77af 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -11195,14 +11195,24 @@ void searchInputFiles() &Doxygen::inputPaths); // paths } } + + // Sort the FileDef objects by full path to get a predictable ordering over multiple runs std::sort(Doxygen::inputNameLinkedMap->begin(), Doxygen::inputNameLinkedMap->end(), [](const auto &f1,const auto &f2) { - return Config_getBool(FULL_PATH_NAMES) ? - qstricmp(f1->fullName(),f2->fullName())<0 : - qstricmp(f1->fileName(),f2->fileName())<0; + return qstricmp(f1->fullName(),f2->fullName())<0; }); + for (auto &fileName : *Doxygen::inputNameLinkedMap) + { + if (fileName->size()>1) + { + std::sort(fileName->begin(),fileName->end(),[](const auto &f1,const auto &f2) + { + return qstricmp(f1->absFilePath(),f2->absFilePath())<0; + }); + } + } g_s.end(); } -- cgit v0.12