From b0aa13f4afc8d8403952e4fdd2e97c3ae4279f9a Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 24 Jun 2018 16:15:49 +0200 Subject: [PATCH] Callstack getters are const. --- server/TracyWorker.cpp | 2 +- server/TracyWorker.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index b288e5b9..3e0c7594 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -745,7 +745,7 @@ std::pair Worker::GetFrameRange( int64_t from, int64_t to ) return std::make_pair( zbegin, zend ); } -const CallstackFrame* Worker::GetCallstackFrame( uint64_t ptr ) +const CallstackFrame* Worker::GetCallstackFrame( uint64_t ptr ) const { auto it = m_data.callstackFrameMap.find( ptr ); if( it == m_data.callstackFrameMap.end() ) diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 9d7c820d..0c707b00 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -162,8 +162,8 @@ public: const Vector& GetThreadData() const { return m_data.threads; } const MemData& GetMemData() const { return m_data.memory; } - const VarArray& GetCallstack( uint32_t idx ) { return *m_data.callstackPayload[idx]; } - const CallstackFrame* GetCallstackFrame( uint64_t ptr ); + const VarArray& GetCallstack( uint32_t idx ) const { return *m_data.callstackPayload[idx]; } + const CallstackFrame* GetCallstackFrame( uint64_t ptr ) const; // Some zones may have incomplete timing data (only start time is available, end hasn't arrived yet). // GetZoneEnd() will try to infer the end time by looking at child zones (parent zone can't end