From f53637891acf3e1f377659c628303c18726ea7ce Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 6 Nov 2019 01:25:38 +0100 Subject: [PATCH] Remove LZ4 include from TracyWorker.hpp. --- server/TracyWorker.cpp | 6 +++--- server/TracyWorker.hpp | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 544a25b1..e99be1a4 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -1838,7 +1838,7 @@ Worker::~Worker() if( m_threadBackground.joinable() ) m_threadBackground.join(); delete[] m_buffer; - LZ4_freeStreamDecode( m_stream ); + LZ4_freeStreamDecode( (LZ4_streamDecode_t*)m_stream ); delete[] m_frameImageBuffer; @@ -2389,7 +2389,7 @@ void Worker::Network() if( !m_sock.Read( lz4buf.get(), lz4sz, 10, ShouldExit ) ) goto close; m_bytes.fetch_add( sizeof( lz4sz ) + lz4sz, std::memory_order_relaxed ); - auto sz = LZ4_decompress_safe_continue( m_stream, lz4buf.get(), buf, lz4sz, TargetFrameSize ); + auto sz = LZ4_decompress_safe_continue( (LZ4_streamDecode_t*)m_stream, lz4buf.get(), buf, lz4sz, TargetFrameSize ); assert( sz >= 0 ); m_decBytes.fetch_add( sz, std::memory_order_relaxed ); @@ -2499,7 +2499,7 @@ void Worker::Exec() m_serverQuerySpaceLeft = ( m_sock.GetSendBufSize() / ServerQueryPacketSize ) - ServerQueryPacketSize; // leave space for terminate request m_hasData.store( true, std::memory_order_release ); - LZ4_setStreamDecode( m_stream, nullptr, 0 ); + LZ4_setStreamDecode( (LZ4_streamDecode_t*)m_stream, nullptr, 0 ); m_connected.store( true, std::memory_order_relaxed ); { std::lock_guard lock( m_netWriteLock ); diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index f6c3dd19..4af271b7 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -12,7 +12,6 @@ #include #include -#include "../common/tracy_lz4.hpp" #include "../common/TracyForceInline.hpp" #include "../common/TracyQueue.hpp" #include "../common/TracyProtocol.hpp" @@ -610,7 +609,7 @@ private: bool m_terminate = false; bool m_crashed = false; bool m_disconnect = false; - LZ4_streamDecode_t* m_stream; + void* m_stream; // LZ4_streamDecode_t* char* m_buffer; int m_bufferOffset; bool m_onDemand;