From 44bb5d474bfee83ea621b8375506232568960ce6 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 16 Oct 2024 00:11:57 +0200 Subject: [PATCH] Simplify condition. --- profiler/src/profiler/TracyView_Callstack.cpp | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/profiler/src/profiler/TracyView_Callstack.cpp b/profiler/src/profiler/TracyView_Callstack.cpp index f65f738f..343a1575 100644 --- a/profiler/src/profiler/TracyView_Callstack.cpp +++ b/profiler/src/profiler/TracyView_Callstack.cpp @@ -213,26 +213,23 @@ void View::DrawCallstackTable( uint32_t callstack, bool globalEntriesButton ) continue; } } - else + else if( external != 0 ) { - if( external != 0 ) + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + ImGui::PushFont( m_smallFont ); + TextDisabledUnformatted( "external" ); + ImGui::TableNextColumn(); + if( external == 1 ) { - ImGui::TableNextRow(); - ImGui::TableNextColumn(); - ImGui::PushFont( m_smallFont ); - TextDisabledUnformatted( "external" ); - ImGui::TableNextColumn(); - if( external == 1 ) - { - TextDisabledUnformatted( "1 frame" ); - } - else - { - ImGui::TextDisabled( "%i frames", external ); - } - ImGui::PopFont(); - external = 0; + TextDisabledUnformatted( "1 frame" ); } + else + { + ImGui::TextDisabled( "%i frames", external ); + } + ImGui::PopFont(); + external = 0; } ImGui::TableNextRow();