Retrieve file name string idx in source view.

This commit is contained in:
Bartosz Taudul 2020-04-02 02:15:10 +02:00
parent 16686739f6
commit 22e9135ab1
2 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@ namespace tracy
SourceView::SourceView( ImFont* font ) SourceView::SourceView( ImFont* font )
: m_font( font ) : m_font( font )
, m_file( nullptr ) , m_file( nullptr )
, m_fileStringIdx( 0 )
, m_symAddr( 0 ) , m_symAddr( 0 )
, m_currentAddr( 0 ) , m_currentAddr( 0 )
, m_targetAddr( 0 ) , m_targetAddr( 0 )
@ -51,6 +52,7 @@ void SourceView::Open( const char* fileName, int line, uint64_t baseAddr, uint64
if( m_file != fileName ) if( m_file != fileName )
{ {
m_file = fileName; m_file = fileName;
m_fileStringIdx = worker.FindStringIdx( fileName );
m_lines.clear(); m_lines.clear();
if( fileName ) if( fileName )
{ {

View File

@ -44,6 +44,7 @@ private:
ImFont* m_font; ImFont* m_font;
const char* m_file; const char* m_file;
uint32_t m_fileStringIdx;
uint64_t m_symAddr; uint64_t m_symAddr;
uint64_t m_currentAddr; uint64_t m_currentAddr;
uint64_t m_baseAddr; uint64_t m_baseAddr;