Use common access-and-insert pattern for VisData.

This commit is contained in:
Bartosz Taudul 2019-03-19 22:12:24 +01:00
parent fddba168c6
commit fa556d2d65

View File

@ -196,7 +196,12 @@ private:
tracy_force_inline VisData& Vis( const void* ptr )
{
return m_visData[ptr];
auto it = m_visData.find( ptr );
if( it == m_visData.end() )
{
it = m_visData.emplace( ptr, VisData {} ).first;
}
return it->second;
}
tracy_force_inline bool& VisibleMsgThread( uint64_t thread )