mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Instead of adding new method, make StoreString public
This commit is contained in:
committed by
trodrigues
parent
c302b509fe
commit
687d681764
@@ -2426,19 +2426,6 @@ const char* Worker::GetString( const StringIdx& idx ) const
|
||||
return m_data.stringData[idx.Idx()];
|
||||
}
|
||||
|
||||
uint32_t Worker::AddNewString(const char* newString)
|
||||
{
|
||||
assert(m_allowStringModification);
|
||||
uint64_t sz = strlen(newString);
|
||||
auto ptr = m_slab.Alloc<char>( sz+1 );
|
||||
memcpy( ptr, newString, sz );
|
||||
ptr[sz] = '\0';
|
||||
uint32_t idx = m_data.stringData.size();
|
||||
m_data.stringMap.emplace( charutil::StringKey { ptr, sz }, idx );
|
||||
m_data.stringData.push_back( ptr );
|
||||
return idx;
|
||||
}
|
||||
|
||||
static const char* BadExternalThreadNames[] = {
|
||||
"ntdll.dll",
|
||||
"???",
|
||||
|
||||
Reference in New Issue
Block a user