From 10b88754d86a4259a650c732194fff8401386484 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 14 Sep 2017 01:05:08 +0200 Subject: [PATCH] Allow direct access to data size table index. --- client/TracyProfiler.cpp | 2 +- common/TracyQueue.hpp | 6 +++++- server/TracyView.cpp | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 05ffc17e..2ca2c343 100755 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -114,7 +114,7 @@ void Profiler::Worker() char* ptr = buf; for( int i=0; ihdr.type]; + ptr += QueueDataSize[ev->hdr.idx]; } } else { QueueItem hdr; if( !sock.Read( &hdr.hdr, sizeof( QueueHeader ), &tv, ShouldExit ) ) goto close; - if( !sock.Read( ((char*)&hdr) + sizeof( QueueHeader ), QueueDataSize[(uint8_t)hdr.hdr.type] - sizeof( QueueHeader ), &tv, ShouldExit ) ) goto close; + if( !sock.Read( ((char*)&hdr) + sizeof( QueueHeader ), QueueDataSize[hdr.hdr.idx] - sizeof( QueueHeader ), &tv, ShouldExit ) ) goto close; Process( hdr ); } }