From b4ce0c281b1e1ddf1c72f1bb38af8be171aee9a5 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 6 Jun 2018 23:17:13 +0200 Subject: [PATCH] Total time is also already known in compare view. --- server/TracyView.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index ee8074ee..a7291038 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4265,18 +4265,17 @@ void View::DrawCompare() memset( bins.get(), 0, sizeof( CompVal ) * numBins ); memset( binTime.get(), 0, sizeof( CompVal ) * numBins ); + double adj0 = 1; + double adj1 = 1; if( m_compare.normalize ) { - double adj0, adj1; if( zones0.size() > zones1.size() ) { - adj0 = 1; adj1 = double( zones0.size() ) / zones1.size(); } else { adj0 = double( zones1.size() ) / zones0.size(); - adj1 = 1; } if( m_compare.logTime ) @@ -4382,8 +4381,6 @@ void View::DrawCompare() } } - double timeTotal0 = binTime[0].v0; - double timeTotal1 = binTime[0].v1; double maxVal; if( cumulateTime ) { @@ -4391,8 +4388,6 @@ void View::DrawCompare() for( int i=1; i