summaryrefslogtreecommitdiffstats
path: root/src/dirdef.cpp
diff options
context:
space:
mode:
authorDavid Hebbeker <david@hebbeker.info>2020-05-02 17:43:59 (GMT)
committerDavid Hebbeker <david@hebbeker.info>2020-05-05 16:28:49 (GMT)
commit750e68e797b6b2500da3b9d770eafbb31b9d23fa (patch)
tree6519b5fe081caf3b2120dd9448f985b460f2a8e6 /src/dirdef.cpp
parent0c28706a1e82a4ad6021ce016bc5937698cbbd3c (diff)
downloadDoxygen-750e68e797b6b2500da3b9d770eafbb31b9d23fa.zip
Doxygen-750e68e797b6b2500da3b9d770eafbb31b9d23fa.tar.gz
Doxygen-750e68e797b6b2500da3b9d770eafbb31b9d23fa.tar.bz2
Create compareDirDefs for sorting.
Diffstat (limited to 'src/dirdef.cpp')
-rw-r--r--src/dirdef.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index d165b6e..b41dc01 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -15,6 +15,7 @@
#include "docparser.h"
#include "definitionimpl.h"
#include "filedef.h"
+#include <algorithm>
//----------------------------------------------------------------------
@@ -159,7 +160,7 @@ void DirDefImpl::addFile(FileDef *fd)
void DirDefImpl::sort()
{
- m_subdirs.sort();
+ std::sort(m_subdirs.begin(), m_subdirs.end(), &compareDirDefs);
m_fileList->sort();
}
@@ -1092,3 +1093,7 @@ void generateDirDocs(OutputList &ol)
}
}
+bool compareDirDefs(const DirDef *item1, const DirDef *item2)
+{
+ return qstricmp(item1->shortName(),item2->shortName()) < 0;
+}