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
This commit is contained in:
@@ -43,15 +43,11 @@ AppInfoList::~AppInfoList()
|
|||||||
|
|
||||||
// AddInfo
|
// AddInfo
|
||||||
bool
|
bool
|
||||||
AppInfoList::AddInfo(RosterAppInfo *info, int32 index)
|
AppInfoList::AddInfo(RosterAppInfo *info)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
if (info) {
|
if (info)
|
||||||
if (index < 0)
|
result = fInfos.AddItem(info);
|
||||||
result = fInfos.AddItem(info);
|
|
||||||
else
|
|
||||||
result = fInfos.AddItem(info, index);
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public:
|
|||||||
AppInfoList();
|
AppInfoList();
|
||||||
virtual ~AppInfoList();
|
virtual ~AppInfoList();
|
||||||
|
|
||||||
bool AddInfo(RosterAppInfo *info, int32 index = -1);
|
bool AddInfo(RosterAppInfo *info);
|
||||||
|
|
||||||
RosterAppInfo *RemoveInfo(int32 index);
|
RosterAppInfo *RemoveInfo(int32 index);
|
||||||
bool RemoveInfo(RosterAppInfo *info);
|
bool RemoveInfo(RosterAppInfo *info);
|
||||||
|
|||||||
Reference in New Issue
Block a user