Made IsTargetLocal() a lot faster by using BPrivate::current_team() which caches the team ID.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21104 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5625684593
commit
4cad5aba3b
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2001-2005, Haiku.
|
||||
* Copyright 2001-2007, Haiku.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@ -161,9 +161,7 @@ BMessenger::~BMessenger()
|
||||
bool
|
||||
BMessenger::IsTargetLocal() const
|
||||
{
|
||||
thread_info info;
|
||||
return get_thread_info(find_thread(NULL), &info) == B_OK
|
||||
&& fTeam == info.team;
|
||||
return BPrivate::current_team() == fTeam;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user