mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Condense code.
This commit is contained in:
parent
a2a314678b
commit
09c9502061
@ -2203,14 +2203,7 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
|||||||
{
|
{
|
||||||
if( (*vbegin)->lockingThread == thread )
|
if( (*vbegin)->lockingThread == thread )
|
||||||
{
|
{
|
||||||
if( !AreOtherWaiting( (*vbegin)->waitList, thread ) )
|
state = AreOtherWaiting( (*vbegin)->waitList, thread ) ? State::HasBlockingLock : State::HasLock;
|
||||||
{
|
|
||||||
state = State::HasLock;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
state = State::HasBlockingLock;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if( IsThreadWaiting( (*vbegin)->waitList, thread ) )
|
else if( IsThreadWaiting( (*vbegin)->waitList, thread ) )
|
||||||
{
|
{
|
||||||
@ -2233,16 +2226,8 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
|||||||
{
|
{
|
||||||
if( (*next)->lockingThread == thread )
|
if( (*next)->lockingThread == thread )
|
||||||
{
|
{
|
||||||
if( !AreOtherWaiting( (*next)->waitList, thread ) )
|
nextState = AreOtherWaiting( (*next)->waitList, thread ) ? State::HasBlockingLock : State::HasLock;
|
||||||
{
|
break;
|
||||||
nextState = State::HasLock;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
nextState = State::HasBlockingLock;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if( IsThreadWaiting( (*next)->waitList, thread ) )
|
else if( IsThreadWaiting( (*next)->waitList, thread ) )
|
||||||
{
|
{
|
||||||
@ -2299,16 +2284,8 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
|||||||
{
|
{
|
||||||
if( (*next)->lockingThread == thread )
|
if( (*next)->lockingThread == thread )
|
||||||
{
|
{
|
||||||
if( !AreOtherWaiting( (*next)->waitList, thread ) )
|
nextState = AreOtherWaiting( (*next)->waitList, thread ) ? State::HasBlockingLock : State::HasLock;
|
||||||
{
|
break;
|
||||||
nextState = State::HasLock;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
nextState = State::HasBlockingLock;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if( (*next)->lockingThread != (*vbegin)->lockingThread )
|
if( (*next)->lockingThread != (*vbegin)->lockingThread )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user