mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
String getter.
This commit is contained in:
parent
0b2a98d6b2
commit
9da7e58ec5
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user