1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Don't check for each type, if range check is possible.

This commit is contained in:
Bartosz Taudul 2018-06-19 19:15:19 +02:00
parent 0a8cd73db7
commit 6a63d09a49

View File

@ -958,8 +958,7 @@ void Worker::ServerQuery( uint8_t type, uint64_t data )
void Worker::DispatchProcess( const QueueItem& ev, char*& ptr )
{
if( ev.hdr.type == QueueType::CustomStringData || ev.hdr.type == QueueType::StringData
|| ev.hdr.type == QueueType::ThreadName || ev.hdr.type == QueueType::PlotName || ev.hdr.type == QueueType::SourceLocationPayload )
if( ev.hdr.idx >= (int)QueueType::StringData )
{
ptr += sizeof( QueueHeader ) + sizeof( QueueStringTransfer );
uint16_t sz;