mirror of
https://github.com/wolfpld/tracy
synced 2026-02-18 02:32:23 +00:00
Some strings are always indices.
This saves 4 bytes.
This commit is contained in:
committed by
Bartosz Taudul
parent
7da59a55cc
commit
7187e1e5f5
@@ -686,7 +686,7 @@ void View::ProcessZoneText( const QueueZoneText& ev )
|
||||
auto it = m_pendingCustomStrings.find( ev.text );
|
||||
assert( it != m_pendingCustomStrings.end() );
|
||||
m_lock.lock();
|
||||
zone->text = StringRef( StringRef::Idx, it->second.idx );
|
||||
zone->text = StringIdx( it->second.idx );
|
||||
m_lock.unlock();
|
||||
m_pendingCustomStrings.erase( it );
|
||||
}
|
||||
@@ -1403,6 +1403,12 @@ const char* View::GetString( const StringRef& ref ) const
|
||||
}
|
||||
}
|
||||
|
||||
const char* View::GetString( const StringIdx& idx ) const
|
||||
{
|
||||
assert( idx.active );
|
||||
return m_stringData[idx.idx];
|
||||
}
|
||||
|
||||
const char* View::GetThreadString( uint64_t id ) const
|
||||
{
|
||||
const auto it = m_threadNames.find( id );
|
||||
|
||||
Reference in New Issue
Block a user