String getter.

This commit is contained in:
Bartosz Taudul 2017-09-21 02:10:20 +02:00
parent 0b2a98d6b2
commit 9da7e58ec5
2 changed files with 14 additions and 0 deletions

View File

@ -386,6 +386,19 @@ const char* View::TimeToString( uint64_t ns ) const
return buf;
}
const char* View::GetString( uint64_t ptr ) const
{
const auto it = m_strings.find( ptr );
if( it == m_strings.end() )
{
return "???";
}
else
{
return it->second.c_str();
}
}
void View::Draw()
{
s_instance->DrawImpl();

View File

@ -53,6 +53,7 @@ private:
uint64_t GetFrameEnd( size_t idx ) const;
uint64_t GetLastTime() const;
const char* TimeToString( uint64_t ns ) const;
const char* GetString( uint64_t ptr ) const;
void DrawImpl();
void DrawFrames();