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

Fixed missing value in initialisation of SymbolQueueItem.

On some compilers it is compilation error, it may be also potential crash ( uninitialised value ).
This commit is contained in:
Sobol 2022-03-10 22:22:16 +00:00
parent 469774b1a9
commit 4c4e09cf11

View File

@ -3117,7 +3117,7 @@ void Profiler::SendCallstackAlloc( uint64_t _ptr )
void Profiler::QueueCallstackFrame( uint64_t ptr ) void Profiler::QueueCallstackFrame( uint64_t ptr )
{ {
#ifdef TRACY_HAS_CALLSTACK #ifdef TRACY_HAS_CALLSTACK
m_symbolQueue.emplace( SymbolQueueItem { SymbolQueueItemType::CallstackFrame, ptr } ); m_symbolQueue.emplace( SymbolQueueItem { SymbolQueueItemType::CallstackFrame, ptr, 0 } );
#else #else
AckServerQuery(); AckServerQuery();
#endif #endif
@ -3138,7 +3138,7 @@ void Profiler::QueueSymbolQuery( uint64_t symbol )
} }
else else
{ {
m_symbolQueue.emplace( SymbolQueueItem { SymbolQueueItemType::SymbolQuery, symbol } ); m_symbolQueue.emplace( SymbolQueueItem { SymbolQueueItemType::SymbolQuery, symbol, 0 } );
} }
#else #else
AckServerQuery(); AckServerQuery();
@ -3148,7 +3148,7 @@ void Profiler::QueueSymbolQuery( uint64_t symbol )
void Profiler::QueueCodeLocation( uint64_t ptr ) void Profiler::QueueCodeLocation( uint64_t ptr )
{ {
#ifdef TRACY_HAS_CALLSTACK #ifdef TRACY_HAS_CALLSTACK
m_symbolQueue.emplace( SymbolQueueItem { SymbolQueueItemType::CodeLocation, ptr } ); m_symbolQueue.emplace( SymbolQueueItem { SymbolQueueItemType::CodeLocation, ptr, 0 } );
#else #else
AckServerQuery(); AckServerQuery();
#endif #endif
@ -3157,7 +3157,7 @@ void Profiler::QueueCodeLocation( uint64_t ptr )
void Profiler::QueueExternalName( uint64_t ptr ) void Profiler::QueueExternalName( uint64_t ptr )
{ {
#ifdef TRACY_HAS_SYSTEM_TRACING #ifdef TRACY_HAS_SYSTEM_TRACING
m_symbolQueue.emplace( SymbolQueueItem { SymbolQueueItemType::ExternalName, ptr } ); m_symbolQueue.emplace( SymbolQueueItem { SymbolQueueItemType::ExternalName, ptr, 0 } );
#endif #endif
} }