diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-12-26 10:18:32 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-12-26 10:18:32 (GMT) |
commit | 459a66a0f6a8073fce07e3f54858d1d078c3a8d3 (patch) | |
tree | 7f54a2069e2e4ad646031fba12ab8da5275763e3 /src/doxygen.cpp | |
parent | bc3349e52752dafef47565c54c4145e43885f0d2 (diff) | |
download | Doxygen-459a66a0f6a8073fce07e3f54858d1d078c3a8d3.zip Doxygen-459a66a0f6a8073fce07e3f54858d1d078c3a8d3.tar.gz Doxygen-459a66a0f6a8073fce07e3f54858d1d078c3a8d3.tar.bz2 |
Improved sorting of class list/hierarchy
When SORT_BY_SCOPE_NAME = NO nested classes with the same name
but in different scopes were shown unsorted.
Now they are alphabetically sorted by scope name which make the
results more deterministic.
Diffstat (limited to 'src/doxygen.cpp')
-rw-r--r-- | src/doxygen.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp index d99c1e6..b5e79dc 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -11467,9 +11467,15 @@ void parseInput() auto classComp = [](const ClassLinkedMap::Ptr &c1,const ClassLinkedMap::Ptr &c2) { - return Config_getBool(SORT_BY_SCOPE_NAME) ? - qstricmp(c1->name(), c2->name())<0 : - qstricmp(c1->className(), c2->className())<0; + if (Config_getBool(SORT_BY_SCOPE_NAME)) + { + return qstricmp(c1->name(), c2->name())<0; + } + else + { + int i = qstricmp(c1->className(), c2->className()); + return i==0 ? qstricmp(c1->name(), c2->name())<0 : i<0; + } }; auto namespaceComp = [](const NamespaceLinkedMap::Ptr &n1,const NamespaceLinkedMap::Ptr &n2) |