From 35267abc8e9536b6788c0b030cbae187a6381568 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 7 Feb 2021 19:58:23 +0100 Subject: [PATCH] Remove obsolete GetZoneDepth() method. --- server/TracyView.cpp | 32 -------------------------------- server/TracyView.hpp | 1 - 2 files changed, 33 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index b38e1930..bc9fd8a5 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -17189,38 +17189,6 @@ void View::CrashTooltip() ImGui::EndTooltip(); } -int View::GetZoneDepth( const ZoneEvent& zone, uint64_t tid ) const -{ - auto td = m_worker.GetThreadData( tid ); - assert( td ); - auto timeline = &td->timeline; - int depth = 0; - for(;;) - { - if( timeline->is_magic() ) - { - auto vec = (Vector*)timeline; - auto it = std::upper_bound( vec->begin(), vec->end(), zone.Start(), [] ( const auto& l, const auto& r ) { return l < r.Start(); } ); - if( it != vec->begin() ) --it; - assert( !( zone.IsEndValid() && it->Start() > zone.End() ) ); - if( it == &zone ) return depth; - assert( it->HasChildren() ); - timeline = &m_worker.GetZoneChildren( it->Child() ); - depth++; - } - else - { - auto it = std::upper_bound( timeline->begin(), timeline->end(), zone.Start(), [] ( const auto& l, const auto& r ) { return l < r->Start(); } ); - if( it != timeline->begin() ) --it; - assert( !( zone.IsEndValid() && (*it)->Start() > zone.End() ) ); - if( *it == &zone ) return depth; - assert( (*it)->HasChildren() ); - timeline = &m_worker.GetZoneChildren( (*it)->Child() ); - depth++; - } - } -} - const ZoneEvent* View::GetZoneParent( const ZoneEvent& zone ) const { for( const auto& thread : m_worker.GetThreadData() ) diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 852722b1..6c3acc28 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -243,7 +243,6 @@ private: void CallstackTooltip( uint32_t idx ); void CrashTooltip(); - int GetZoneDepth( const ZoneEvent& zone, uint64_t tid ) const; const ZoneEvent* GetZoneParent( const ZoneEvent& zone ) const; const ZoneEvent* GetZoneParent( const ZoneEvent& zone, uint64_t tid ) const; const GpuEvent* GetZoneParent( const GpuEvent& zone ) const;