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

View File

@@ -650,7 +650,7 @@ void View::DrawMemoryAllocWindow()
if( !show ) m_memoryAllocInfoWindow = -1;
}
void View::ListMemData( std::vector<const MemEvent*>& vec, std::function<void(const MemEvent*)> DrawAddress, const char* id, int64_t startTime, uint64_t pool )
void View::ListMemData( std::vector<const MemEvent*>& vec, const std::function<void(const MemEvent*)>& DrawAddress, const char* id, int64_t startTime, uint64_t pool )
{
if( startTime == -1 ) startTime = 0;
if( ImGui::BeginTable( "##mem", 8, ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable | ImGuiTableFlags_Sortable | ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_ScrollY, ImVec2( 0, ImGui::GetTextLineHeightWithSpacing() * std::min<int64_t>( 1+vec.size(), 15 ) ) ) )