1
0
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:
Bartosz Taudul
2023-04-16 16:44:18 +02:00
parent 778d0cb3fb
commit a0221c8660
16 changed files with 24 additions and 24 deletions
+2 -2
View File
@@ -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 )