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:
@@ -99,8 +99,8 @@ public:
|
||||
using SetScaleCallback = void(*)( float, ImFont*&, ImFont*&, ImFont*& );
|
||||
using AttentionCallback = void(*)();
|
||||
|
||||
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( void(*cbMainThread)(std::function<void()>, bool), FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb );
|
||||
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 );
|
||||
View( void(*cbMainThread)(const std::function<void()>&, bool), FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb );
|
||||
~View();
|
||||
|
||||
bool Draw();
|
||||
@@ -259,7 +259,7 @@ private:
|
||||
void DrawSourceTooltip( const char* filename, uint32_t line, int before = 3, int after = 3, bool separateTooltip = true );
|
||||
void DrawWaitStacks();
|
||||
|
||||
void ListMemData( std::vector<const MemEvent*>& vec, std::function<void(const MemEvent*)> DrawAddress, const char* id = nullptr, int64_t startTime = -1, uint64_t pool = 0 );
|
||||
void ListMemData( std::vector<const MemEvent*>& vec, const std::function<void(const MemEvent*)>& DrawAddress, const char* id = nullptr, int64_t startTime = -1, uint64_t pool = 0 );
|
||||
|
||||
unordered_flat_map<uint32_t, MemPathData> GetCallstackPaths( const MemData& mem, MemRange memRange ) const;
|
||||
unordered_flat_map<uint64_t, MemCallstackFrameTree> GetCallstackFrameTreeBottomUp( const MemData& mem ) const;
|
||||
@@ -578,7 +578,7 @@ private:
|
||||
|
||||
unordered_flat_map<const void*, bool> m_visMap;
|
||||
|
||||
void(*m_cbMainThread)(std::function<void()>, bool);
|
||||
void(*m_cbMainThread)(const std::function<void()>&, bool);
|
||||
|
||||
int m_gpuIdx = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user