mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Pass function objects through const references.
This commit is contained in:
@@ -44,7 +44,7 @@ namespace tracy
|
||||
|
||||
double s_time = 0;
|
||||
|
||||
View::View( void(*cbMainThread)(std::function<void()>, bool), const char* addr, uint16_t port, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb )
|
||||
View::View( void(*cbMainThread)(const std::function<void()>&, bool), const char* addr, uint16_t port, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb )
|
||||
: m_worker( addr, port )
|
||||
, m_staticView( false )
|
||||
, m_viewMode( ViewMode::LastFrames )
|
||||
@@ -68,7 +68,7 @@ View::View( void(*cbMainThread)(std::function<void()>, bool), const char* addr,
|
||||
InitTextEditor( fixedWidth );
|
||||
}
|
||||
|
||||
View::View( void(*cbMainThread)(std::function<void()>, bool), FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb )
|
||||
View::View( void(*cbMainThread)(const std::function<void()>&, bool), FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb )
|
||||
: m_worker( f )
|
||||
, m_filename( f.GetFilename() )
|
||||
, m_staticView( true )
|
||||
|
||||
Reference in New Issue
Block a user