Remove unused variables.

This commit is contained in:
Bartosz Taudul 2020-08-15 02:23:04 +02:00
parent be0e3b9cc4
commit f828fed015
2 changed files with 3 additions and 13 deletions

View File

@ -2533,8 +2533,6 @@ void SourceView::RenderAsmLine( AsmLine& line, uint32_t ipcnt, uint32_t iptotal,
const auto fileColor = GetHsvColor( srcidx.Idx(), 0 ); const auto fileColor = GetHsvColor( srcidx.Idx(), 0 );
SmallColorBox( fileColor ); SmallColorBox( fileColor );
ImGui::SameLine(); ImGui::SameLine();
const auto lineString = RealToString( srcline );
const auto linesz = strlen( lineString );
char buf[64]; char buf[64];
const auto fnsz = strlen( fileName ); const auto fnsz = strlen( fileName );
if( fnsz < 30 - m_maxLine ) if( fnsz < 30 - m_maxLine )
@ -3211,11 +3209,7 @@ uint32_t SourceView::CountAsmIpStats( uint64_t addr, const Worker& worker, bool
uint32_t cnt = 0; uint32_t cnt = 0;
auto ipmap = worker.GetSymbolInstructionPointers( addr ); auto ipmap = worker.GetSymbolInstructionPointers( addr );
if( !ipmap ) return 0; if( !ipmap ) return 0;
for( auto& ip : *ipmap ) for( auto& ip : *ipmap ) cnt += ip.second;
{
auto addr = worker.GetCanonicalPointer( ip.first );
cnt += ip.second;
}
return cnt; return cnt;
} }
} }
@ -3302,7 +3296,7 @@ static bool TokenizeNumber( const char*& begin, const char* end )
begin++; begin++;
} }
if( !hasNum ) return false; if( !hasNum ) return false;
bool isFloat = false, isHex = false, isBinary = false; bool isFloat = false, isBinary = false;
if( begin < end ) if( begin < end )
{ {
if( *begin == '.' ) if( *begin == '.' )
@ -3313,7 +3307,7 @@ static bool TokenizeNumber( const char*& begin, const char* end )
} }
else if( *begin == 'x' || *begin == 'X' ) else if( *begin == 'x' || *begin == 'X' )
{ {
isHex = true; // hexadecimal
begin++; begin++;
while( begin < end && ( ( *begin >= '0' && *begin <= '9' ) || ( *begin >= 'a' && *begin <= 'f' ) || ( *begin >= 'A' && *begin <= 'F' ) || *begin == '\'' ) ) begin++; while( begin < end && ( ( *begin >= '0' && *begin <= '9' ) || ( *begin >= 'a' && *begin <= 'f' ) || ( *begin >= 'A' && *begin <= 'F' ) || *begin == '\'' ) ) begin++;
} }

View File

@ -3907,7 +3907,6 @@ int View::SkipGhostLevel( const Vector<GhostZone>& vec, bool hover, double pxns,
if( zsz < MinVisSize ) if( zsz < MinVisSize )
{ {
auto px1 = ( ev.end.Val() - m_vd.zvStart ) * pxns; auto px1 = ( ev.end.Val() - m_vd.zvStart ) * pxns;
auto rend = end;
auto nextTime = end + MinVisSize * nspx; auto nextTime = end + MinVisSize * nspx;
for(;;) for(;;)
{ {
@ -3919,7 +3918,6 @@ int View::SkipGhostLevel( const Vector<GhostZone>& vec, bool hover, double pxns,
const auto pxnext = ( nend - m_vd.zvStart ) * pxns; const auto pxnext = ( nend - m_vd.zvStart ) * pxns;
if( pxnext - px1 >= MinVisSize * 2 ) break; if( pxnext - px1 >= MinVisSize * 2 ) break;
px1 = pxnext; px1 = pxnext;
rend = nend;
nextTime = nend + nspx; nextTime = nend + nspx;
} }
} }
@ -13081,8 +13079,6 @@ void View::DrawInfo()
auto lt = localtime( &date ); auto lt = localtime( &date );
strftime( dtmp, 64, "%F %T", lt ); strftime( dtmp, 64, "%F %T", lt );
const auto& io = ImGui::GetIO();
ImGui::SetNextWindowSize( ImVec2( 400, 650 ), ImGuiCond_FirstUseEver ); ImGui::SetNextWindowSize( ImVec2( 400, 650 ), ImGuiCond_FirstUseEver );
ImGui::Begin( "Trace information", &m_showInfo, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse ); ImGui::Begin( "Trace information", &m_showInfo, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse );
if( m_bigFont ) ImGui::PushFont( m_bigFont ); if( m_bigFont ) ImGui::PushFont( m_bigFont );