mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-26 03:55:55 +00:00
Trim address entry field.
Sometimes a stray whitespace may be inserted in the address field, for example when copying and pasting from somewhere else.
This commit is contained in:
@@ -65,17 +65,16 @@ void ConnectionHistory::Rebuild()
|
||||
std::swap( m_connHistVec, vec );
|
||||
}
|
||||
|
||||
void ConnectionHistory::Count( const char* name )
|
||||
void ConnectionHistory::Count( const std::string& name )
|
||||
{
|
||||
std::string addr( name );
|
||||
auto it = m_connHistMap.find( addr );
|
||||
auto it = m_connHistMap.find( name );
|
||||
if( it != m_connHistMap.end() )
|
||||
{
|
||||
it->second++;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_connHistMap.emplace( std::move( addr ), 1 );
|
||||
m_connHistMap.emplace( name, 1 );
|
||||
}
|
||||
Rebuild();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user