From 331f18345f436469917b84cf66a29c5c20e816b2 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 16 Jun 2022 15:29:39 +0200 Subject: [PATCH] Add braces around initialization of subobjects. --- server/TracyWorker.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index bbe3e412..e5939698 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -350,13 +350,13 @@ Worker::Worker( const char* name, const char* program, const std::vectorsecond = SourceLocation { srcloc.name == 0 ? StringRef() : StringRef( StringRef::Ptr, srcloc.name ), StringRef( StringRef::Ptr, srcloc.function ), StringRef( StringRef::Ptr, srcloc.file ), srcloc.line, color }; + it->second = SourceLocation {{ srcloc.name == 0 ? StringRef() : StringRef( StringRef::Ptr, srcloc.name ), StringRef( StringRef::Ptr, srcloc.function ), StringRef( StringRef::Ptr, srcloc.file ), srcloc.line, color }}; } void Worker::AddSourceLocationPayload( uint64_t ptr, const char* data, size_t sz ) @@ -3910,7 +3910,7 @@ void Worker::AddSourceLocationPayload( uint64_t ptr, const char* data, size_t sz ( ( color & 0x0000FF00 ) ) | ( ( color & 0x000000FF ) << 16 ); - SourceLocation srcloc { nsz == 0 ? StringRef() : StringRef( StringRef::Idx, StoreString( end, nsz ).idx ), StringRef( StringRef::Idx, func.idx ), StringRef( StringRef::Idx, source.idx ), line, color }; + SourceLocation srcloc {{ nsz == 0 ? StringRef() : StringRef( StringRef::Idx, StoreString( end, nsz ).idx ), StringRef( StringRef::Idx, func.idx ), StringRef( StringRef::Idx, source.idx ), line, color }}; auto it = m_data.sourceLocationPayloadMap.find( &srcloc ); if( it == m_data.sourceLocationPayloadMap.end() ) {