diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-01-25 21:11:43 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-01-25 21:11:43 (GMT) |
commit | 3ced61065d252f4f8a3cf5f310f30094d91ac83c (patch) | |
tree | 5e3ff29c80e73d69c88e8b33d670753c31eed4b2 /src/classlist.cpp | |
parent | 29348f280d674693e74e30ae55ca63ab3b97372e (diff) | |
download | Doxygen-3ced61065d252f4f8a3cf5f310f30094d91ac83c.zip Doxygen-3ced61065d252f4f8a3cf5f310f30094d91ac83c.tar.gz Doxygen-3ced61065d252f4f8a3cf5f310f30094d91ac83c.tar.bz2 |
Release-1.3.5-20040125
Diffstat (limited to 'src/classlist.cpp')
-rw-r--r-- | src/classlist.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/classlist.cpp b/src/classlist.cpp index c9fc0d1..7a52556 100644 --- a/src/classlist.cpp +++ b/src/classlist.cpp @@ -30,26 +30,29 @@ ClassList::~ClassList() { } -int ClassList::compareItems(GCI item1, GCI item2) +static int compItems(void *item1,void *item2) { ClassDef *c1=(ClassDef *)item1; ClassDef *c2=(ClassDef *)item2; - //return stricmp(c1->localName().data()+getPrefixIndex(c1->localName()), - // c2->localName().data()+getPrefixIndex(c2->localName()) - // ); - return stricmp(c1->className().data()+getPrefixIndex(c1->className()), - c2->className().data()+getPrefixIndex(c2->className())); + int p1=0,p2=0; + static bool b = Config_getBool("SORT_BY_SCOPE_NAME"); + if (!b) + { + p1=getPrefixIndex(c1->className()); + p2=getPrefixIndex(c2->className()); + } + return stricmp(c1->className().data()+p1, + c2->className().data()+p2); +} + +int ClassList::compareItems(GCI item1, GCI item2) +{ + return compItems(item1,item2); } int ClassSDict::compareItems(GCI item1, GCI item2) { - ClassDef *c1=(ClassDef *)item1; - ClassDef *c2=(ClassDef *)item2; - //return stricmp(c1->localName().data()+getPrefixIndex(c1->localName()), - // c2->localName().data()+getPrefixIndex(c2->localName()) - // ); - return stricmp(c1->className().data()+getPrefixIndex(c1->className()), - c2->className().data()+getPrefixIndex(c2->className())); + return compItems(item1,item2); } ClassListIterator::ClassListIterator(const ClassList &cllist) : |