1
0
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:
Bartosz Taudul
2017-11-24 01:05:42 +01:00
parent 184039d500
commit 7a13892754
2 changed files with 14 additions and 2 deletions
+11 -1
View File
@@ -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 );