Removed a couple of unnecessary includes

(Hopefully) patched a crash under the BApplication Quit2 test
Speedup for CursorManager::RemoveAppCursors


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9216 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm
2004-10-05 23:00:47 +00:00
parent 601a55f349
commit 76d4213d60
7 changed files with 35 additions and 13 deletions
+2 -7
View File
@@ -153,23 +153,18 @@ void CursorManager::DeleteCursor(int32 token)
\brief Removes and deletes all of an application's cursors
\param signature Signature to which the cursors belong
*/
void CursorManager::RemoveAppCursors(const char *signature)
void CursorManager::RemoveAppCursors(team_id team)
{
// OPTIMIZATION: For an optimization, it perhaps may be wise down
// the road to replace the ServerCursor's app signature with a
// pointer to its application and compare ServerApp pointers instead.
Lock();
ServerCursor *temp;
for(int32 i=0; i<fCursorList->CountItems();i++)
{
temp=(ServerCursor*)fCursorList->ItemAt(i);
if(temp && temp->GetAppSignature() &&
strcmp(signature, temp->GetAppSignature())==0)
if(temp && temp->OwningTeam()==team)
{
fCursorList->RemoveItem(i);
delete temp;
break;
}
}
Unlock();