mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
Unsafe version of AppendData.
This commit is contained in:
parent
a2c6848433
commit
4d197ec7a2
@ -456,8 +456,7 @@ bool Profiler::AppendData( const void* data, size_t len )
|
|||||||
{
|
{
|
||||||
auto ret = true;
|
auto ret = true;
|
||||||
ret = NeedDataSize( len );
|
ret = NeedDataSize( len );
|
||||||
memcpy( m_buffer + m_bufferOffset, data, len );
|
AppendDataUnsafe( data, len );
|
||||||
m_bufferOffset += int( len );
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,6 +279,12 @@ private:
|
|||||||
bool CommitData();
|
bool CommitData();
|
||||||
bool NeedDataSize( size_t len );
|
bool NeedDataSize( size_t len );
|
||||||
|
|
||||||
|
tracy_force_inline void AppendDataUnsafe( const void* data, size_t len )
|
||||||
|
{
|
||||||
|
memcpy( m_buffer + m_bufferOffset, data, len );
|
||||||
|
m_bufferOffset += int( len );
|
||||||
|
}
|
||||||
|
|
||||||
bool SendData( const char* data, size_t len );
|
bool SendData( const char* data, size_t len );
|
||||||
void SendString( uint64_t ptr, const char* str, QueueType type );
|
void SendString( uint64_t ptr, const char* str, QueueType type );
|
||||||
void SendSourceLocation( uint64_t ptr );
|
void SendSourceLocation( uint64_t ptr );
|
||||||
|
Loading…
Reference in New Issue
Block a user