From ab2e0d7d3fb07b2259d9345e78ec8e40c8bf2cc6 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 28 Jul 2002 00:25:33 +0000 Subject: [PATCH] Removed the optional index parameter from AddInfo(). It wasn't used and would avoid to replace the list implementation by one that e.g. maintains a sorted list or a hash table or whatever. Think about changing the other methods operating on indices to use iterators. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@483 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/servers/registrar/AppInfoList.cpp | 10 +++------- src/servers/registrar/AppInfoList.h | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/servers/registrar/AppInfoList.cpp b/src/servers/registrar/AppInfoList.cpp index ca9895552d..393908a2af 100644 --- a/src/servers/registrar/AppInfoList.cpp +++ b/src/servers/registrar/AppInfoList.cpp @@ -43,15 +43,11 @@ AppInfoList::~AppInfoList() // AddInfo bool -AppInfoList::AddInfo(RosterAppInfo *info, int32 index) +AppInfoList::AddInfo(RosterAppInfo *info) { bool result = false; - if (info) { - if (index < 0) - result = fInfos.AddItem(info); - else - result = fInfos.AddItem(info, index); - } + if (info) + result = fInfos.AddItem(info); return result; } diff --git a/src/servers/registrar/AppInfoList.h b/src/servers/registrar/AppInfoList.h index 56dde2fa52..92ff46a50a 100644 --- a/src/servers/registrar/AppInfoList.h +++ b/src/servers/registrar/AppInfoList.h @@ -39,7 +39,7 @@ public: AppInfoList(); virtual ~AppInfoList(); - bool AddInfo(RosterAppInfo *info, int32 index = -1); + bool AddInfo(RosterAppInfo *info); RosterAppInfo *RemoveInfo(int32 index); bool RemoveInfo(RosterAppInfo *info);