From adb2f9a664ed38fe48525b62fed12fb4027633e6 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 16 Apr 2023 17:23:19 +0200 Subject: [PATCH] GetFrameTreeItemNoGroup() doesn't need worker paramater. --- server/TracyView_FrameTree.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/server/TracyView_FrameTree.cpp b/server/TracyView_FrameTree.cpp index 97fcfe26..b9a5cb7f 100644 --- a/server/TracyView_FrameTree.cpp +++ b/server/TracyView_FrameTree.cpp @@ -6,7 +6,7 @@ namespace tracy { template -static tracy_force_inline T* GetFrameTreeItemNoGroup( unordered_flat_map& tree, CallstackFrameId idx, const Worker& worker ) +static tracy_force_inline T* GetFrameTreeItemNoGroup( unordered_flat_map& tree, CallstackFrameId idx ) { auto it = tree.find( idx.data ); if( it == tree.end() ) @@ -177,13 +177,13 @@ unordered_flat_map View::GetCallstackFrameTreeB { auto& cs = m_worker.GetCallstack( path.first ); auto base = cs.back(); - auto treePtr = GetFrameTreeItemNoGroup( root, base, m_worker ); + auto treePtr = GetFrameTreeItemNoGroup( root, base ); treePtr->count += path.second.cnt; treePtr->alloc += path.second.mem; treePtr->callstacks.emplace( path.first ); for( int i = int( cs.size() ) - 2; i >= 0; i-- ) { - treePtr = GetFrameTreeItemNoGroup( treePtr->children, cs[i], m_worker ); + treePtr = GetFrameTreeItemNoGroup( treePtr->children, cs[i] ); treePtr->count += path.second.cnt; treePtr->alloc += path.second.mem; treePtr->callstacks.emplace( path.first ); @@ -221,11 +221,11 @@ unordered_flat_map View::GetCallstackFrameTreeBott { auto& cs = m_worker.GetCallstack( path.first ); auto base = cs.back(); - auto treePtr = GetFrameTreeItemNoGroup( root, base, m_worker ); + auto treePtr = GetFrameTreeItemNoGroup( root, base ); treePtr->count += path.second; for( int i = int( cs.size() ) - 2; i >= 0; i-- ) { - treePtr = GetFrameTreeItemNoGroup( treePtr->children, cs[i], m_worker ); + treePtr = GetFrameTreeItemNoGroup( treePtr->children, cs[i] ); treePtr->count += path.second; } } @@ -261,11 +261,11 @@ unordered_flat_map View::GetParentsCallstackFrameT { auto& cs = m_worker.GetParentCallstack( path.first ); auto base = cs.back(); - auto treePtr = GetFrameTreeItemNoGroup( root, base, m_worker ); + auto treePtr = GetFrameTreeItemNoGroup( root, base ); treePtr->count += path.second; for( int i = int( cs.size() ) - 2; i >= 0; i-- ) { - treePtr = GetFrameTreeItemNoGroup( treePtr->children, cs[i], m_worker ); + treePtr = GetFrameTreeItemNoGroup( treePtr->children, cs[i] ); treePtr->count += path.second; } } @@ -307,13 +307,13 @@ unordered_flat_map View::GetCallstackFrameTreeT { auto& cs = m_worker.GetCallstack( path.first ); auto base = cs.front(); - auto treePtr = GetFrameTreeItemNoGroup( root, base, m_worker ); + auto treePtr = GetFrameTreeItemNoGroup( root, base ); treePtr->count += path.second.cnt; treePtr->alloc += path.second.mem; treePtr->callstacks.emplace( path.first ); for( uint16_t i = 1; i < cs.size(); i++ ) { - treePtr = GetFrameTreeItemNoGroup( treePtr->children, cs[i], m_worker ); + treePtr = GetFrameTreeItemNoGroup( treePtr->children, cs[i] ); treePtr->count += path.second.cnt; treePtr->alloc += path.second.mem; treePtr->callstacks.emplace( path.first ); @@ -351,11 +351,11 @@ unordered_flat_map View::GetCallstackFrameTreeTopD { auto& cs = m_worker.GetCallstack( path.first ); auto base = cs.front(); - auto treePtr = GetFrameTreeItemNoGroup( root, base, m_worker ); + auto treePtr = GetFrameTreeItemNoGroup( root, base ); treePtr->count += path.second; for( uint16_t i = 1; i < cs.size(); i++ ) { - treePtr = GetFrameTreeItemNoGroup( treePtr->children, cs[i], m_worker ); + treePtr = GetFrameTreeItemNoGroup( treePtr->children, cs[i] ); treePtr->count += path.second; } } @@ -391,11 +391,11 @@ unordered_flat_map View::GetParentsCallstackFrameT { auto& cs = m_worker.GetParentCallstack( path.first ); auto base = cs.front(); - auto treePtr = GetFrameTreeItemNoGroup( root, base, m_worker ); + auto treePtr = GetFrameTreeItemNoGroup( root, base ); treePtr->count += path.second; for( uint16_t i = 1; i < cs.size(); i++ ) { - treePtr = GetFrameTreeItemNoGroup( treePtr->children, cs[i], m_worker ); + treePtr = GetFrameTreeItemNoGroup( treePtr->children, cs[i] ); treePtr->count += path.second; } }