mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
No need to inject string terminator.
Comparison in m_data.stringMap already takes string size into account, as an charutil::StringKey optimization.
This commit is contained in:
parent
dfad9695d2
commit
4a4fe82a1b
@ -3345,8 +3345,6 @@ void Worker::HandlePostponedPlots()
|
||||
StringLocation Worker::StoreString( char* str, size_t sz )
|
||||
{
|
||||
StringLocation ret;
|
||||
const char backup = str[sz];
|
||||
str[sz] = '\0';
|
||||
charutil::StringKey key = { str, sz };
|
||||
auto sit = m_data.stringMap.find( key );
|
||||
if( sit == m_data.stringMap.end() )
|
||||
@ -3364,7 +3362,6 @@ StringLocation Worker::StoreString( char* str, size_t sz )
|
||||
ret.ptr = sit->first.ptr;
|
||||
ret.idx = sit->second;
|
||||
}
|
||||
str[sz] = backup;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user