diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2011-08-21 08:11:15 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2011-08-21 08:11:15 (GMT) |
commit | 5c424c553763d3f56f56e3fa3336b0f1f4a3c44a (patch) | |
tree | 26df576f6822a144ec9e57d58a5e9cca717ebd7b /src/memberlist.cpp | |
parent | 9be758009e1a4c616377dc33ccf1e55dd8b04d9b (diff) | |
download | Doxygen-5c424c553763d3f56f56e3fa3336b0f1f4a3c44a.zip Doxygen-5c424c553763d3f56f56e3fa3336b0f1f4a3c44a.tar.gz Doxygen-5c424c553763d3f56f56e3fa3336b0f1f4a3c44a.tar.bz2 |
Release-1.7.5.1
Diffstat (limited to 'src/memberlist.cpp')
-rw-r--r-- | src/memberlist.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 4949f23..3cca845 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -808,10 +808,22 @@ void MemberList::setNeedsSorting(bool b) int MemberSDict::compareItems(GCI item1, GCI item2) { + // NOTE: this function can be triggered from unmarshalMemberSDict + // so it may not result in called to MemberDef::makeResident(). + // As a result, the data returned by MemberDef::name() and + // MemberDef::getDefLine() will always be kept in memory. MemberDef *c1=(MemberDef *)item1; MemberDef *c2=(MemberDef *)item2; + //printf("MemberSDict::compareItems(%s,%s)\n",c1->name().data(),c2->name().data()); int cmp = stricmp(c1->name(),c2->name()); - return cmp!=0 ? cmp : c1->getDefLine()-c2->getDefLine(); + if (cmp) + { + return cmp; + } + else + { + return c1->getDefLine()-c2->getDefLine(); + } } |