Worker must be mutable.

This is to allow use of various accessors that cache results, etc.
This commit is contained in:
Bartosz Taudul 2022-09-03 18:34:11 +02:00
parent b481bb367c
commit 119152aac1
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
6 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@
namespace tracy
{
TimelineController::TimelineController( View& view, const Worker& worker )
TimelineController::TimelineController( View& view, Worker& worker )
: m_height( 0 )
, m_offset( 0 )
, m_scroll( 0 )

View File

@ -23,7 +23,7 @@ class TimelineController
};
public:
TimelineController( View& view, const Worker& worker );
TimelineController( View& view, Worker& worker );
void FirstFrameExpired();
void Begin();
@ -73,7 +73,7 @@ private:
bool m_firstFrame;
View& m_view;
const Worker& m_worker;
Worker& m_worker;
};
}

View File

@ -8,7 +8,7 @@
namespace tracy
{
TimelineItem::TimelineItem( View& view, const Worker& worker )
TimelineItem::TimelineItem( View& view, Worker& worker )
: m_visible( true )
, m_showFull( true )
, m_height( 0 )

View File

@ -14,7 +14,7 @@ class Worker;
class TimelineItem
{
public:
TimelineItem( View& view, const Worker& worker );
TimelineItem( View& view, Worker& worker );
virtual ~TimelineItem() = default;
void Draw( bool firstFrame, double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax );
@ -47,7 +47,7 @@ private:
protected:
View& m_view;
const Worker& m_worker;
Worker& m_worker;
};
}

View File

@ -8,7 +8,7 @@
namespace tracy
{
TimelineItemPlot::TimelineItemPlot( View& view, const Worker& worker, PlotData* plot )
TimelineItemPlot::TimelineItemPlot( View& view, Worker& worker, PlotData* plot )
: TimelineItem( view, worker )
, m_plot( plot )
{

View File

@ -10,7 +10,7 @@ namespace tracy
class TimelineItemPlot final : public TimelineItem
{
public:
TimelineItemPlot( View& view, const Worker& worker, PlotData* plot );
TimelineItemPlot( View& view, Worker& worker, PlotData* plot );
void DrawContents( double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax ) override;