summaryrefslogtreecommitdiffstats
path: root/src/memberlist.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2011-08-21 08:11:15 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2011-08-21 08:11:15 (GMT)
commit5c424c553763d3f56f56e3fa3336b0f1f4a3c44a (patch)
tree26df576f6822a144ec9e57d58a5e9cca717ebd7b /src/memberlist.cpp
parent9be758009e1a4c616377dc33ccf1e55dd8b04d9b (diff)
downloadDoxygen-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.cpp14
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();
+ }
}