Allow access to timeline items stored in the controller.

This is similar to the previously existing Vis() access function.
This commit is contained in:
Bartosz Taudul 2022-09-03 16:47:41 +02:00
parent 9355a14657
commit 1736fb387a
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -1,6 +1,7 @@
#ifndef __TRACYTIMELINECONTROLLER_HPP__
#define __TRACYTIMELINECONTROLLER_HPP__
#include <assert.h>
#include <vector>
#include "../public/common/TracyForceInline.hpp"
@ -42,6 +43,13 @@ public:
void AdjustThreadHeight( VisData& vis, int oldOffset, int& offset );
float AdjustThreadPosition( VisData& vis, float wy, int& offset );
tracy_force_inline TimelineItem& GetItem( const void* data )
{
auto it = m_itemMap.find( data );
assert( it != m_itemMap.end() );
return *it->second;
}
tracy_force_inline VisData& Vis( const void* ptr )
{
auto it = m_visData.find( ptr );