1
0
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:
Tiago Rodrigues
2023-11-18 15:04:02 -05:00
committed by trodrigues
parent c302b509fe
commit 687d681764
2 changed files with 1 additions and 15 deletions
-13
View File
@@ -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",
"???",