mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-28 21:15:58 +00:00
Merge pull request #1269 from DaniPopes/thread-sort
Sort threads by ID after name
This commit is contained in:
@@ -702,7 +702,9 @@ void View::DrawOptions()
|
||||
{
|
||||
pdqsort_branchless( m_threadOrder.begin(), m_threadOrder.end(), [this] ( const auto& lhs, const auto& rhs ) {
|
||||
if( lhs->groupHint != rhs->groupHint ) return lhs->groupHint < rhs->groupHint;
|
||||
return strcmp( m_worker.GetThreadName( lhs->id ), m_worker.GetThreadName( rhs->id ) ) < 0;
|
||||
const auto cmp = strcmp( m_worker.GetThreadName( lhs->id ), m_worker.GetThreadName( rhs->id ) );
|
||||
if( cmp != 0 ) return cmp < 0;
|
||||
return lhs->id < rhs->id;
|
||||
} );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user