mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Split srcloc check and creation.
This commit is contained in:
+11
-1
@@ -939,8 +939,18 @@ static const SourceLocation emptySourceLocation = {};
|
||||
|
||||
void View::CheckSourceLocation( uint64_t ptr )
|
||||
{
|
||||
if( m_sourceLocation.find( ptr ) != m_sourceLocation.end() ) return;
|
||||
if( m_sourceLocation.find( ptr ) != m_sourceLocation.end() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
NewSourceLocation( ptr );
|
||||
}
|
||||
}
|
||||
|
||||
void View::NewSourceLocation( uint64_t ptr )
|
||||
{
|
||||
m_sourceLocation.emplace( ptr, emptySourceLocation );
|
||||
m_pendingSourceLocation++;
|
||||
m_sourceLocationQueue.push_back( ptr );
|
||||
|
||||
Reference in New Issue
Block a user