summaryrefslogtreecommitdiffstats
path: root/src/memberlist.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2013-12-30 17:55:14 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-12-30 17:55:14 (GMT)
commit6e51abf63021dc9fe32c05f003232fe68a08591d (patch)
treee9fe6f526e4a2b22b1a55659331c15750969a019 /src/memberlist.cpp
parent744d1ca52e25dfa9e3d656056d87ed7cb6320585 (diff)
downloadDoxygen-6e51abf63021dc9fe32c05f003232fe68a08591d.zip
Doxygen-6e51abf63021dc9fe32c05f003232fe68a08591d.tar.gz
Doxygen-6e51abf63021dc9fe32c05f003232fe68a08591d.tar.bz2
Reduced and improved functionality of QList
- operations on current index and node (next(), prev(), last(), first()) have been removed. - access to internal nodes has been removed. - old QList has been renamed to QInternalList for use inside qtools only. - added type safe compare, new, and delete operations (compareValues(), newValue(), deleteValue()). - add compareValues also to QDict for consistency. - changed doxygen's implementation to comply with the new QList and QDict interface.
Diffstat (limited to 'src/memberlist.cpp')
-rw-r--r--src/memberlist.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index 101293a..d5f9ea4 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -55,11 +55,9 @@ MemberList::~MemberList()
delete memberGroupList;
}
-int MemberList::compareItems(QCollection::Item item1, QCollection::Item item2)
+int MemberList::compareValues(const MemberDef *c1, const MemberDef *c2) const
{
static bool sortConstructorsFirst = Config_getBool("SORT_MEMBERS_CTORS_1ST");
- MemberDef *c1=(MemberDef *)item1;
- MemberDef *c2=(MemberDef *)item2;
if (sortConstructorsFirst) {
int ord1 = c1->isConstructor() ? 2 : (c1->isDestructor() ? 1 : 0);
int ord2 = c2->isConstructor() ? 2 : (c2->isDestructor() ? 1 : 0);
@@ -938,15 +936,9 @@ QCString MemberList::listTypeAsString(MemberListType type)
//--------------------------------------------------------------------------
-int MemberSDict::compareItems(QCollection::Item item1, QCollection::Item item2)
+int MemberSDict::compareValues(const MemberDef *c1, const MemberDef *c2) const
{
- // 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());
+ //printf("MemberSDict::compareValues(%s,%s)\n",c1->name().data(),c2->name().data());
int cmp = qstricmp(c1->name(),c2->name());
if (cmp)
{