From de18dd46b6569d948f5c7c2597f6d7dad1d17b18 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 12 Apr 2020 16:05:49 +0200 Subject: [PATCH] Don't build inline symbols list, if not needed. --- server/TracySourceView.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index e403b451..ac9817fe 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -406,23 +406,23 @@ void SourceView::RenderSymbolView( const Worker& worker ) auto inlineList = worker.GetInlineSymbolList( m_baseAddr, m_codeLen ); if( inlineList ) { - const auto symEnd = m_baseAddr + m_codeLen; - Vector symInline( m_baseAddr ); - while( *inlineList < symEnd ) - { - if( *inlineList != m_baseAddr ) - { - symInline.push_back_non_empty( *inlineList ); - } - inlineList++; - } - SmallCheckbox( ICON_FA_SITEMAP " Function:", &m_calcInlineStats ); ImGui::SameLine(); ImGui::SetNextItemWidth( -1 ); ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 0, 0 ) ); if( ImGui::BeginCombo( "##functionList", worker.GetString( sym->name ), ImGuiComboFlags_HeightLarge ) ) { + const auto symEnd = m_baseAddr + m_codeLen; + Vector symInline( m_baseAddr ); + while( *inlineList < symEnd ) + { + if( *inlineList != m_baseAddr ) + { + symInline.push_back_non_empty( *inlineList ); + } + inlineList++; + } + ImGui::Columns( 3 ); static bool widthSet = false; if( !widthSet )